Documentation
¶
Index ¶
- Constants
- Variables
- type API
- type ConfigProvider
- type Handler
- func (h *Handler) API() *API
- func (h *Handler) Addr() string
- func (h *Handler) ExtractOperation(*echo.Context) string
- func (h *Handler) ExtractResource(*echo.Context) string
- func (h *Handler) GetSupportedOperations() []string
- func (h *Handler) Handler() echo.HandlerFunc
- func (h *Handler) MatchPriority() int
- func (h *Handler) Name() string
- func (h *Handler) Reset()
- func (h *Handler) Restore(ctx context.Context, data []byte) error
- func (h *Handler) RouteMatcher() service.Matcher
- func (h *Handler) Shutdown(ctx context.Context)
- func (h *Handler) Snapshot(ctx context.Context) []byte
- func (h *Handler) StartWorker(ctx context.Context) error
- type InMemoryBackend
- func (b *InMemoryBackend) CheckAndMutateRow(req *btpb.CheckAndMutateRowRequest) (*btpb.CheckAndMutateRowResponse, error)
- func (b *InMemoryBackend) CheckConsistency(in *adminpb.CheckConsistencyRequest) (*adminpb.CheckConsistencyResponse, error)
- func (b *InMemoryBackend) CopyBackup(in *adminpb.CopyBackupRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateAppProfile(in *adminpb.CreateAppProfileRequest) (*adminpb.AppProfile, error)
- func (b *InMemoryBackend) CreateAuthorizedView(in *adminpb.CreateAuthorizedViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateBackup(in *adminpb.CreateBackupRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateCluster(in *adminpb.CreateClusterRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateInstance(in *adminpb.CreateInstanceRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateLogicalView(in *adminpb.CreateLogicalViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateMaterializedView(in *adminpb.CreateMaterializedViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateSchemaBundle(in *adminpb.CreateSchemaBundleRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) CreateTable(in *adminpb.CreateTableRequest) (*adminpb.Table, error)
- func (b *InMemoryBackend) DeleteAppProfile(in *adminpb.DeleteAppProfileRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteAuthorizedView(in *adminpb.DeleteAuthorizedViewRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteBackup(name string) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteCluster(name string) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteInstance(name string) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteLogicalView(in *adminpb.DeleteLogicalViewRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteMaterializedView(in *adminpb.DeleteMaterializedViewRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteSchemaBundle(in *adminpb.DeleteSchemaBundleRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DeleteTable(name string) (*emptypb.Empty, error)
- func (b *InMemoryBackend) DropRowRange(in *adminpb.DropRowRangeRequest) (*emptypb.Empty, error)
- func (b *InMemoryBackend) GenerateConsistencyToken(in *adminpb.GenerateConsistencyTokenRequest) (*adminpb.GenerateConsistencyTokenResponse, error)
- func (b *InMemoryBackend) GetAppProfile(name string) (*adminpb.AppProfile, error)
- func (b *InMemoryBackend) GetAuthorizedView(in *adminpb.GetAuthorizedViewRequest) (*adminpb.AuthorizedView, error)
- func (b *InMemoryBackend) GetBackup(name string) (*adminpb.Backup, error)
- func (b *InMemoryBackend) GetCluster(name string) (*adminpb.Cluster, error)
- func (b *InMemoryBackend) GetIamPolicy(resource string, version int32) (*iampb.Policy, error)
- func (b *InMemoryBackend) GetInstance(name string) (*adminpb.Instance, error)
- func (b *InMemoryBackend) GetLogicalView(in *adminpb.GetLogicalViewRequest) (*adminpb.LogicalView, error)
- func (b *InMemoryBackend) GetMaterializedView(in *adminpb.GetMaterializedViewRequest) (*adminpb.MaterializedView, error)
- func (b *InMemoryBackend) GetSchemaBundle(in *adminpb.GetSchemaBundleRequest) (*adminpb.SchemaBundle, error)
- func (b *InMemoryBackend) GetTable(in *adminpb.GetTableRequest) (*adminpb.Table, error)
- func (b *InMemoryBackend) InitialChangeStreamPartitions(req *btpb.GenerateInitialChangeStreamPartitionsRequest) ([]*btpb.StreamPartition, error)
- func (b *InMemoryBackend) ListAppProfiles(in *adminpb.ListAppProfilesRequest) (*adminpb.ListAppProfilesResponse, error)
- func (b *InMemoryBackend) ListAuthorizedViews(in *adminpb.ListAuthorizedViewsRequest) (*adminpb.ListAuthorizedViewsResponse, error)
- func (b *InMemoryBackend) ListBackups(in *adminpb.ListBackupsRequest) (*adminpb.ListBackupsResponse, error)
- func (b *InMemoryBackend) ListClusters(in *adminpb.ListClustersRequest) (*adminpb.ListClustersResponse, error)
- func (b *InMemoryBackend) ListInstances(in *adminpb.ListInstancesRequest) (*adminpb.ListInstancesResponse, error)
- func (b *InMemoryBackend) ListLogicalViews(in *adminpb.ListLogicalViewsRequest) (*adminpb.ListLogicalViewsResponse, error)
- func (b *InMemoryBackend) ListMaterializedViews(in *adminpb.ListMaterializedViewsRequest) (*adminpb.ListMaterializedViewsResponse, error)
- func (b *InMemoryBackend) ListSchemaBundles(in *adminpb.ListSchemaBundlesRequest) (*adminpb.ListSchemaBundlesResponse, error)
- func (b *InMemoryBackend) ListTables(in *adminpb.ListTablesRequest) (*adminpb.ListTablesResponse, error)
- func (b *InMemoryBackend) ModifyColumnFamilies(in *adminpb.ModifyColumnFamiliesRequest) (*adminpb.Table, error)
- func (b *InMemoryBackend) MutateRow(req *btpb.MutateRowRequest) (*btpb.MutateRowResponse, error)
- func (b *InMemoryBackend) MutateRows(req *btpb.MutateRowsRequest) ([]*btpb.MutateRowsResponse_Entry, error)
- func (b *InMemoryBackend) PartialUpdateCluster(in *adminpb.PartialUpdateClusterRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) PartialUpdateInstance(in *adminpb.PartialUpdateInstanceRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) PingAndWarm(req *btpb.PingAndWarmRequest) error
- func (b *InMemoryBackend) ReadModifyWriteRow(req *btpb.ReadModifyWriteRowRequest) (*btpb.ReadModifyWriteRowResponse, error)
- func (b *InMemoryBackend) ReadRows(req *btpb.ReadRowsRequest) (*ReadResult, error)
- func (b *InMemoryBackend) Reset()
- func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
- func (b *InMemoryBackend) RestoreTable(in *adminpb.RestoreTableRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) SampleRowKeys(req *btpb.SampleRowKeysRequest) ([]*btpb.SampleRowKeysResponse, error)
- func (b *InMemoryBackend) SetIamPolicy(in *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
- func (b *InMemoryBackend) SetKeyChecker(c cmek.Checker)
- func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
- func (b *InMemoryBackend) StreamChanges(ctx context.Context, req *btpb.ReadChangeStreamRequest, ...) error
- func (b *InMemoryBackend) TestIamPermissions(in *iampb.TestIamPermissionsRequest) (*iampb.TestIamPermissionsResponse, error)
- func (b *InMemoryBackend) UndeleteTable(in *adminpb.UndeleteTableRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateAppProfile(in *adminpb.UpdateAppProfileRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateAuthorizedView(in *adminpb.UpdateAuthorizedViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateBackup(in *adminpb.UpdateBackupRequest) (*adminpb.Backup, error)
- func (b *InMemoryBackend) UpdateCluster(in *adminpb.Cluster) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateInstance(in *adminpb.Instance) (*adminpb.Instance, error)
- func (b *InMemoryBackend) UpdateLogicalView(in *adminpb.UpdateLogicalViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateMaterializedView(in *adminpb.UpdateMaterializedViewRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateSchemaBundle(in *adminpb.UpdateSchemaBundleRequest) (*longrunningpb.Operation, error)
- func (b *InMemoryBackend) UpdateTable(in *adminpb.UpdateTableRequest) (*longrunningpb.Operation, error)
- type Provider
- type ReadResult
- type ResultRow
- type Settings
Constants ¶
const DefaultPort = 8137
DefaultPort is the dedicated gRPC and REST listener's default TCP port.
Variables ¶
var ErrNilAppContext = errors.New("gcpbigtable: nil app context")
ErrNilAppContext is returned when Init is called with a nil AppContext.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Instances adminpb.BigtableInstanceAdminServer
Tables adminpb.BigtableTableAdminServer
// contains filtered or unexported fields
}
API groups the Bigtable services for in-process callers (dashboard proxy).
type ConfigProvider ¶
type ConfigProvider interface {
GetGCPBigtableSettings() Settings
}
ConfigProvider extracts Bigtable configuration from the AppContext Config.
type Handler ¶
type Handler struct {
Backend *InMemoryBackend
Port int
// contains filtered or unexported fields
}
Handler serves the Cloud Bigtable admin and data APIs on a dedicated gRPC and REST listener.
func NewHandler ¶
func NewHandler(backend *InMemoryBackend) *Handler
NewHandler creates a Handler; callers override Port from Settings.
func (*Handler) ExtractOperation ¶
ExtractOperation is unused: requests never reach the shared router.
func (*Handler) ExtractResource ¶
ExtractResource is unused: requests never reach the shared router.
func (*Handler) GetSupportedOperations ¶
GetSupportedOperations lists the supported gRPC methods.
func (*Handler) Handler ¶
func (h *Handler) Handler() echo.HandlerFunc
Handler returns a 404 handler; the real API is on the dedicated port.
func (*Handler) MatchPriority ¶
MatchPriority is irrelevant because RouteMatcher never matches.
func (*Handler) RouteMatcher ¶
RouteMatcher never matches: Cloud Bigtable runs on its own listener.
type InMemoryBackend ¶
type InMemoryBackend struct {
// contains filtered or unexported fields
}
InMemoryBackend holds all Cloud Bigtable state under one lock.
func NewInMemoryBackend ¶
func NewInMemoryBackend() *InMemoryBackend
NewInMemoryBackend creates an empty backend.
func (*InMemoryBackend) CheckAndMutateRow ¶
func (b *InMemoryBackend) CheckAndMutateRow( req *btpb.CheckAndMutateRowRequest, ) (*btpb.CheckAndMutateRowResponse, error)
CheckAndMutateRow applies one of two mutation lists depending on whether the predicate matches the row.
func (*InMemoryBackend) CheckConsistency ¶
func (b *InMemoryBackend) CheckConsistency( in *adminpb.CheckConsistencyRequest, ) (*adminpb.CheckConsistencyResponse, error)
CheckConsistency reports whether all writes before the token reached every cluster; replication is synchronous here.
func (*InMemoryBackend) CopyBackup ¶
func (b *InMemoryBackend) CopyBackup(in *adminpb.CopyBackupRequest) (*longrunningpb.Operation, error)
CopyBackup copies a READY backup that is not itself a copy into a cluster, possibly of another instance.
func (*InMemoryBackend) CreateAppProfile ¶
func (b *InMemoryBackend) CreateAppProfile(in *adminpb.CreateAppProfileRequest) (*adminpb.AppProfile, error)
CreateAppProfile creates an app profile.
func (*InMemoryBackend) CreateAuthorizedView ¶
func (b *InMemoryBackend) CreateAuthorizedView( in *adminpb.CreateAuthorizedViewRequest, ) (*longrunningpb.Operation, error)
CreateAuthorizedView creates a subset view of a table.
func (*InMemoryBackend) CreateBackup ¶
func (b *InMemoryBackend) CreateBackup(in *adminpb.CreateBackupRequest) (*longrunningpb.Operation, error)
CreateBackup snapshots a table into a backup stored in a cluster.
func (*InMemoryBackend) CreateCluster ¶
func (b *InMemoryBackend) CreateCluster(in *adminpb.CreateClusterRequest) (*longrunningpb.Operation, error)
CreateCluster adds a cluster to an instance.
func (*InMemoryBackend) CreateInstance ¶
func (b *InMemoryBackend) CreateInstance(in *adminpb.CreateInstanceRequest) (*longrunningpb.Operation, error)
CreateInstance creates an instance with its clusters.
func (*InMemoryBackend) CreateLogicalView ¶
func (b *InMemoryBackend) CreateLogicalView(in *adminpb.CreateLogicalViewRequest) (*longrunningpb.Operation, error)
CreateLogicalView stores a named query over the instance's tables.
func (*InMemoryBackend) CreateMaterializedView ¶
func (b *InMemoryBackend) CreateMaterializedView( in *adminpb.CreateMaterializedViewRequest, ) (*longrunningpb.Operation, error)
CreateMaterializedView stores a named continuously-maintained query.
func (*InMemoryBackend) CreateSchemaBundle ¶
func (b *InMemoryBackend) CreateSchemaBundle(in *adminpb.CreateSchemaBundleRequest) (*longrunningpb.Operation, error)
CreateSchemaBundle stores a proto or Avro schema bundle on a table.
func (*InMemoryBackend) CreateTable ¶
func (b *InMemoryBackend) CreateTable(in *adminpb.CreateTableRequest) (*adminpb.Table, error)
CreateTable creates a table with its column families and split points.
func (*InMemoryBackend) DeleteAppProfile ¶
func (b *InMemoryBackend) DeleteAppProfile(in *adminpb.DeleteAppProfileRequest) (*emptypb.Empty, error)
DeleteAppProfile deletes an app profile.
func (*InMemoryBackend) DeleteAuthorizedView ¶
func (b *InMemoryBackend) DeleteAuthorizedView(in *adminpb.DeleteAuthorizedViewRequest) (*emptypb.Empty, error)
DeleteAuthorizedView removes a view unless it is protected.
func (*InMemoryBackend) DeleteBackup ¶
func (b *InMemoryBackend) DeleteBackup(name string) (*emptypb.Empty, error)
DeleteBackup deletes a backup.
func (*InMemoryBackend) DeleteCluster ¶
func (b *InMemoryBackend) DeleteCluster(name string) (*emptypb.Empty, error)
DeleteCluster deletes a cluster and its backups; the last cluster of an instance cannot be deleted.
func (*InMemoryBackend) DeleteInstance ¶
func (b *InMemoryBackend) DeleteInstance(name string) (*emptypb.Empty, error)
DeleteInstance deletes an instance and everything in it.
func (*InMemoryBackend) DeleteLogicalView ¶
func (b *InMemoryBackend) DeleteLogicalView(in *adminpb.DeleteLogicalViewRequest) (*emptypb.Empty, error)
DeleteLogicalView removes a logical view unless it is protected.
func (*InMemoryBackend) DeleteMaterializedView ¶
func (b *InMemoryBackend) DeleteMaterializedView(in *adminpb.DeleteMaterializedViewRequest) (*emptypb.Empty, error)
DeleteMaterializedView removes a materialized view unless it is protected.
func (*InMemoryBackend) DeleteSchemaBundle ¶
func (b *InMemoryBackend) DeleteSchemaBundle(in *adminpb.DeleteSchemaBundleRequest) (*emptypb.Empty, error)
DeleteSchemaBundle removes a bundle.
func (*InMemoryBackend) DeleteTable ¶
func (b *InMemoryBackend) DeleteTable(name string) (*emptypb.Empty, error)
DeleteTable deletes a table unless it is protected.
func (*InMemoryBackend) DropRowRange ¶
func (b *InMemoryBackend) DropRowRange(in *adminpb.DropRowRangeRequest) (*emptypb.Empty, error)
DropRowRange deletes the rows with a key prefix, or all rows.
func (*InMemoryBackend) GenerateConsistencyToken ¶
func (b *InMemoryBackend) GenerateConsistencyToken( in *adminpb.GenerateConsistencyTokenRequest, ) (*adminpb.GenerateConsistencyTokenResponse, error)
GenerateConsistencyToken issues a token for CheckConsistency.
func (*InMemoryBackend) GetAppProfile ¶
func (b *InMemoryBackend) GetAppProfile(name string) (*adminpb.AppProfile, error)
GetAppProfile returns an app profile.
func (*InMemoryBackend) GetAuthorizedView ¶
func (b *InMemoryBackend) GetAuthorizedView(in *adminpb.GetAuthorizedViewRequest) (*adminpb.AuthorizedView, error)
GetAuthorizedView returns a view; BASIC (the default) omits the subset, FULL includes it.
func (*InMemoryBackend) GetBackup ¶
func (b *InMemoryBackend) GetBackup(name string) (*adminpb.Backup, error)
GetBackup returns a backup.
func (*InMemoryBackend) GetCluster ¶
func (b *InMemoryBackend) GetCluster(name string) (*adminpb.Cluster, error)
GetCluster returns a cluster.
func (*InMemoryBackend) GetIamPolicy ¶
GetIamPolicy returns the policy of an instance, table or backup at the requested version.
func (*InMemoryBackend) GetInstance ¶
func (b *InMemoryBackend) GetInstance(name string) (*adminpb.Instance, error)
GetInstance returns an instance.
func (*InMemoryBackend) GetLogicalView ¶
func (b *InMemoryBackend) GetLogicalView(in *adminpb.GetLogicalViewRequest) (*adminpb.LogicalView, error)
GetLogicalView returns one logical view.
func (*InMemoryBackend) GetMaterializedView ¶
func (b *InMemoryBackend) GetMaterializedView( in *adminpb.GetMaterializedViewRequest, ) (*adminpb.MaterializedView, error)
GetMaterializedView returns one materialized view.
func (*InMemoryBackend) GetSchemaBundle ¶
func (b *InMemoryBackend) GetSchemaBundle(in *adminpb.GetSchemaBundleRequest) (*adminpb.SchemaBundle, error)
GetSchemaBundle returns one bundle.
func (*InMemoryBackend) GetTable ¶
func (b *InMemoryBackend) GetTable(in *adminpb.GetTableRequest) (*adminpb.Table, error)
GetTable returns a table in the requested view (SCHEMA_VIEW by default).
func (*InMemoryBackend) InitialChangeStreamPartitions ¶
func (b *InMemoryBackend) InitialChangeStreamPartitions( req *btpb.GenerateInitialChangeStreamPartitionsRequest, ) ([]*btpb.StreamPartition, error)
InitialChangeStreamPartitions splits the key space of a change-stream table along its split points.
func (*InMemoryBackend) ListAppProfiles ¶
func (b *InMemoryBackend) ListAppProfiles( in *adminpb.ListAppProfilesRequest, ) (*adminpb.ListAppProfilesResponse, error)
ListAppProfiles lists the app profiles of an instance.
func (*InMemoryBackend) ListAuthorizedViews ¶
func (b *InMemoryBackend) ListAuthorizedViews( in *adminpb.ListAuthorizedViewsRequest, ) (*adminpb.ListAuthorizedViewsResponse, error)
ListAuthorizedViews lists the views of a table (NAME_ONLY by default).
func (*InMemoryBackend) ListBackups ¶
func (b *InMemoryBackend) ListBackups(in *adminpb.ListBackupsRequest) (*adminpb.ListBackupsResponse, error)
ListBackups lists the backups of a cluster, or of every cluster of an instance when the cluster is "-".
func (*InMemoryBackend) ListClusters ¶
func (b *InMemoryBackend) ListClusters(in *adminpb.ListClustersRequest) (*adminpb.ListClustersResponse, error)
ListClusters lists the clusters of an instance, or of every instance in a project when the instance is "-".
func (*InMemoryBackend) ListInstances ¶
func (b *InMemoryBackend) ListInstances(in *adminpb.ListInstancesRequest) (*adminpb.ListInstancesResponse, error)
ListInstances lists the instances of a project.
func (*InMemoryBackend) ListLogicalViews ¶
func (b *InMemoryBackend) ListLogicalViews( in *adminpb.ListLogicalViewsRequest, ) (*adminpb.ListLogicalViewsResponse, error)
ListLogicalViews lists the logical views of an instance.
func (*InMemoryBackend) ListMaterializedViews ¶
func (b *InMemoryBackend) ListMaterializedViews( in *adminpb.ListMaterializedViewsRequest, ) (*adminpb.ListMaterializedViewsResponse, error)
ListMaterializedViews lists the materialized views of an instance.
func (*InMemoryBackend) ListSchemaBundles ¶
func (b *InMemoryBackend) ListSchemaBundles( in *adminpb.ListSchemaBundlesRequest, ) (*adminpb.ListSchemaBundlesResponse, error)
ListSchemaBundles lists the bundles of a table.
func (*InMemoryBackend) ListTables ¶
func (b *InMemoryBackend) ListTables(in *adminpb.ListTablesRequest) (*adminpb.ListTablesResponse, error)
ListTables lists the tables of an instance (NAME_ONLY by default).
func (*InMemoryBackend) ModifyColumnFamilies ¶
func (b *InMemoryBackend) ModifyColumnFamilies(in *adminpb.ModifyColumnFamiliesRequest) (*adminpb.Table, error)
ModifyColumnFamilies creates, updates and drops column families atomically.
func (*InMemoryBackend) MutateRow ¶
func (b *InMemoryBackend) MutateRow(req *btpb.MutateRowRequest) (*btpb.MutateRowResponse, error)
MutateRow atomically applies mutations to one row.
func (*InMemoryBackend) MutateRows ¶
func (b *InMemoryBackend) MutateRows(req *btpb.MutateRowsRequest) ([]*btpb.MutateRowsResponse_Entry, error)
MutateRows applies each entry atomically and independently; the result holds one status per entry.
func (*InMemoryBackend) PartialUpdateCluster ¶
func (b *InMemoryBackend) PartialUpdateCluster( in *adminpb.PartialUpdateClusterRequest, ) (*longrunningpb.Operation, error)
PartialUpdateCluster updates the masked fields of a cluster.
func (*InMemoryBackend) PartialUpdateInstance ¶
func (b *InMemoryBackend) PartialUpdateInstance( in *adminpb.PartialUpdateInstanceRequest, ) (*longrunningpb.Operation, error)
PartialUpdateInstance updates the masked fields of an instance.
func (*InMemoryBackend) PingAndWarm ¶
func (b *InMemoryBackend) PingAndWarm(req *btpb.PingAndWarmRequest) error
PingAndWarm checks that the instance exists.
func (*InMemoryBackend) ReadModifyWriteRow ¶
func (b *InMemoryBackend) ReadModifyWriteRow( req *btpb.ReadModifyWriteRowRequest, ) (*btpb.ReadModifyWriteRowResponse, error)
ReadModifyWriteRow applies append and increment rules to a row and returns the cells it wrote.
func (*InMemoryBackend) ReadRows ¶
func (b *InMemoryBackend) ReadRows(req *btpb.ReadRowsRequest) (*ReadResult, error)
ReadRows evaluates a read: row selection, filter, reversal and the row limit.
func (*InMemoryBackend) Restore ¶
func (b *InMemoryBackend) Restore(ctx context.Context, data []byte) error
Restore loads a snapshot, replacing all state.
func (*InMemoryBackend) RestoreTable ¶
func (b *InMemoryBackend) RestoreTable(in *adminpb.RestoreTableRequest) (*longrunningpb.Operation, error)
RestoreTable creates a new table from a backup.
func (*InMemoryBackend) SampleRowKeys ¶
func (b *InMemoryBackend) SampleRowKeys(req *btpb.SampleRowKeysRequest) ([]*btpb.SampleRowKeysResponse, error)
SampleRowKeys returns approximate split points with the cumulative size of the rows before each.
func (*InMemoryBackend) SetIamPolicy ¶
func (b *InMemoryBackend) SetIamPolicy(in *iampb.SetIamPolicyRequest) (*iampb.Policy, error)
SetIamPolicy replaces a policy; a stale etag aborts the call.
func (*InMemoryBackend) SetKeyChecker ¶
func (b *InMemoryBackend) SetKeyChecker(c cmek.Checker)
SetKeyChecker validates cluster encryption keys against Cloud KMS; without one, keys are accepted unchecked.
func (*InMemoryBackend) Snapshot ¶
func (b *InMemoryBackend) Snapshot(ctx context.Context) []byte
Snapshot serialises every instance with its clusters, profiles, tables, rows, backups and operations.
func (*InMemoryBackend) StreamChanges ¶
func (b *InMemoryBackend) StreamChanges( ctx context.Context, req *btpb.ReadChangeStreamRequest, send func(*btpb.ReadChangeStreamResponse) error, ) error
StreamChanges delivers the committed changes of a partition from the requested position. With an end_time it returns once that time has passed; otherwise it keeps delivering until the context ends, with a heartbeat every heartbeat_duration.
func (*InMemoryBackend) TestIamPermissions ¶
func (b *InMemoryBackend) TestIamPermissions( in *iampb.TestIamPermissionsRequest, ) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions reports the requested Bigtable permissions as granted: the emulator authorises all callers.
func (*InMemoryBackend) UndeleteTable ¶
func (b *InMemoryBackend) UndeleteTable(in *adminpb.UndeleteTableRequest) (*longrunningpb.Operation, error)
UndeleteTable restores a table deleted within the last seven days. The table comes back with deletion protection enabled and without its IAM bindings, as the managing-tables page documents.
func (*InMemoryBackend) UpdateAppProfile ¶
func (b *InMemoryBackend) UpdateAppProfile(in *adminpb.UpdateAppProfileRequest) (*longrunningpb.Operation, error)
UpdateAppProfile updates the masked fields of an app profile; an empty mask replaces every field.
func (*InMemoryBackend) UpdateAuthorizedView ¶
func (b *InMemoryBackend) UpdateAuthorizedView( in *adminpb.UpdateAuthorizedViewRequest, ) (*longrunningpb.Operation, error)
UpdateAuthorizedView updates the masked fields; a stale etag aborts the call.
func (*InMemoryBackend) UpdateBackup ¶
func (b *InMemoryBackend) UpdateBackup(in *adminpb.UpdateBackupRequest) (*adminpb.Backup, error)
UpdateBackup changes a backup's expiry.
func (*InMemoryBackend) UpdateCluster ¶
func (b *InMemoryBackend) UpdateCluster(in *adminpb.Cluster) (*longrunningpb.Operation, error)
UpdateCluster changes the serve_nodes of a cluster.
func (*InMemoryBackend) UpdateInstance ¶
UpdateInstance replaces an instance's display name and type.
func (*InMemoryBackend) UpdateLogicalView ¶
func (b *InMemoryBackend) UpdateLogicalView(in *adminpb.UpdateLogicalViewRequest) (*longrunningpb.Operation, error)
UpdateLogicalView changes the masked fields; a stale etag aborts the call.
func (*InMemoryBackend) UpdateMaterializedView ¶
func (b *InMemoryBackend) UpdateMaterializedView( in *adminpb.UpdateMaterializedViewRequest, ) (*longrunningpb.Operation, error)
UpdateMaterializedView changes deletion protection; the query is immutable.
func (*InMemoryBackend) UpdateSchemaBundle ¶
func (b *InMemoryBackend) UpdateSchemaBundle(in *adminpb.UpdateSchemaBundleRequest) (*longrunningpb.Operation, error)
UpdateSchemaBundle replaces the schema of a bundle; the kind of schema cannot change.
func (*InMemoryBackend) UpdateTable ¶
func (b *InMemoryBackend) UpdateTable(in *adminpb.UpdateTableRequest) (*longrunningpb.Operation, error)
UpdateTable updates the masked table-level settings.
type Provider ¶
type Provider struct{}
Provider implements service.Provider for Google Cloud Bigtable. It serves gRPC and REST on its own listener (see Handler.StartWorker) and never matches on the shared AWS router.
func (*Provider) Init ¶
func (p *Provider) Init(ctx *service.AppContext) (service.Registerable, error)
Init creates the backend and handler; the port is bound in StartWorker.
type ReadResult ¶
type ReadResult struct {
Stats *btpb.ReadIterationStats
Rows []*ResultRow
}
ReadResult is the outcome of one ReadRows call.
type ResultRow ¶
type ResultRow struct {
Key string
Cells []fcell
}
ResultRow is one scanned row; a row the filter emptied has no cells.
type Settings ¶
type Settings struct {
Port int `` //nolint:lll // config struct tags are intentionally verbose
/* 209-byte string literal not displayed */
}
Settings holds service-level configuration, embedded in the root CLI command as CLI.GCPBigtable.
func DefaultSettings ¶
func DefaultSettings() Settings
DefaultSettings returns the settings used when no ConfigProvider is available.
Source Files
¶
- aggregate.go
- appprofiles.go
- authorized_views.go
- backup_copy.go
- backup_filter.go
- backups.go
- changestream.go
- cmek.go
- errors.go
- filter.go
- gc.go
- grpc.go
- handler.go
- iam.go
- inproc.go
- instance_views.go
- instances.go
- mask.go
- mutate.go
- names.go
- ops.go
- persistence.go
- provider.go
- read.go
- rmw.go
- rows.go
- schema_bundles.go
- settings.go
- store.go
- tables.go