github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/util/errorutil/tenant.go (about) 1 // Copyright 2020 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 11 package errorutil 12 13 import "github.com/cockroachdb/cockroachdb-parser/pkg/util/errorutil/unimplemented" 14 15 // UnsupportedUnderClusterVirtualizationMessage is the message used by UnsupportedUnderClusterVirtualization error. 16 const UnsupportedUnderClusterVirtualizationMessage = "operation is unsupported within a virtual cluster" 17 18 // UnsupportedUnderClusterVirtualization returns an error suitable for 19 // returning when an operation could not be carried out due to the SQL 20 // server running inside a virtual cluster. In that mode, Gossip and 21 // other components of the KV layer are not available. 22 func UnsupportedUnderClusterVirtualization(issue int) error { 23 return unimplemented.NewWithIssue(issue, UnsupportedUnderClusterVirtualizationMessage) 24 } 25 26 // FeatureNotAvailableToNonSystemTenantsIssue is to be used with the 27 // Optional and related error interfaces when a feature is simply not 28 // available to non-system tenants (i.e. we're not planning to change 29 // this). 30 // For all other multitenancy errors where there is a plan to 31 // improve the situation, a specific issue should be created instead. 32 const FeatureNotAvailableToNonSystemTenantsIssue = 54252