Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var MaxTenantID = MakeTenantID(math.MaxUint64)
MaxTenantID is the maximum ID of a (non-system) tenant in a multi-tenant cluster.
var MinTenantID = MakeTenantID(2)
MinTenantID is the minimum ID of a (non-system) tenant in a multi-tenant cluster.
var SystemTenantID = MakeTenantID(1)
SystemTenantID is the ID associated with the system's internal tenant in a multi-tenant cluster and the only tenant in a single-tenant cluster.
The system tenant differs from all other tenants in four important ways: 1. the system tenant's keyspace is not prefixed with a tenant specifier. 2. the system tenant is created by default during cluster initialization. 3. the system tenant is always present and can never be destroyed. 4. the system tenant has the ability to create and destroy other tenants.
Functions ¶
func IsSystemTenantID ¶
IsSystemTenantID returns whether the provided ID corresponds to that of the system tenant.
Types ¶
type TenantID ¶
type TenantID struct {
// contains filtered or unexported fields
}
A TenantID is a unique ID associated with a tenant in a multi-tenant cluster. Each tenant is granted exclusive access to a portion of the keyspace and a collection of SQL tables in that keyspace which comprise a "logical" cluster.
The type is intentionally opaque to require deliberate use.
func MakeTenantID ¶
MakeTenantID constructs a new TenantID from the provided uint64.
type Version ¶
type Version struct { Major int32 `protobuf:"varint,1,opt,name=major_val,json=majorVal" json:"major_val"` Minor int32 `protobuf:"varint,2,opt,name=minor_val,json=minorVal" json:"minor_val"` // Note that patch is a placeholder and will always be zero. Patch int32 `protobuf:"varint,3,opt,name=patch" json:"patch"` // The unstable version is used to migrate during development. // Users of stable, public releases will only use binaries // with unstable set to 0. Unstable int32 `protobuf:"varint,4,opt,name=unstable" json:"unstable"` }
func MustParseVersion ¶
MustParseVersion calls ParseVersion and panics on error.
func ParseVersion ¶
ParseVersion parses a Version from a string of the form "<major>.<minor>-<unstable>" where the "-<unstable>" is optional. We don't use the Patch component, so it is always zero.