Documentation ¶
Overview ¶
Package http provides the http implementation of the Director interface.
Index ¶
- Variables
- func Handler(c *controller.Controller) http.Handler
- type AddressManager
- type ComputeNodesRequest
- type ComputeNodesResponse
- type CreateFieldRequest
- type DatabaseByNameRequest
- type DatabaseOptionRequest
- type DatabasesRequest
- type DeregisterNodesRequest
- type Director
- func (d *Director) SendDirective(ctx context.Context, dir *dax.Directive) error
- func (d *Director) SendSnapshotFieldKeysRequest(ctx context.Context, req *dax.SnapshotFieldKeysRequest) error
- func (d *Director) SendSnapshotShardDataRequest(ctx context.Context, req *dax.SnapshotShardDataRequest) error
- func (d *Director) SendSnapshotTableKeysRequest(ctx context.Context, req *dax.SnapshotTableKeysRequest) error
- type DirectorConfig
- type DropFieldRequest
- type IngestPartitionRequest
- type IngestPartitionResponse
- type IngestShardRequest
- type IngestShardResponse
- type RegisterNodesRequest
- type SnapshotFieldKeysRequest
- type SnapshotShardRequest
- type SnapshotTableKeysRequest
- type TablesRequest
- type TranslateNodesRequest
- type TranslateNodesResponse
Constants ¶
This section is empty.
Variables ¶
var ErrNotImplemented = errors.New(errors.ErrUncoded, "not implemented")
Functions ¶
func Handler ¶
func Handler(c *controller.Controller) http.Handler
Types ¶
type AddressManager ¶
type AddressManager struct {
// contains filtered or unexported fields
}
AddressManager is an http implementation of the AddressManager interface.
func NewAddressManager ¶
func NewAddressManager(mdsAddress dax.Address) *AddressManager
func (*AddressManager) AddAddresses ¶
func (*AddressManager) RemoveAddresses ¶
type ComputeNodesRequest ¶
type ComputeNodesRequest struct { Table dax.QualifiedTableID `json:"table"` Shards dax.ShardNums `json:"shards"` IsWrite bool `json:"is-write"` }
ComputeNodesRequest is used to specify the table/shards to consider in the ComputeNodes method call. If IsWrite is true, shards which are not currently being managed by the underlying Controller will be added to (registered with) the Controller and, if adequate compute is available, will be associated with a compute node.
type ComputeNodesResponse ¶
type ComputeNodesResponse struct {
ComputeNodes []dax.ComputeNode `json:"compute-nodes"`
}
ComputeNodesResponse contains the list of compute nodes returned based on the table/shards specified in the ComputeNodeRequest. It's possible that shards provided are not included in this response. That might happen if there are currently no active compute nodes.
type CreateFieldRequest ¶
type DatabaseByNameRequest ¶
type DatabaseByNameRequest struct { OrganizationID dax.OrganizationID `json:"org-id"` Name dax.DatabaseName `json:"name"` }
type DatabaseOptionRequest ¶ added in v3.32.0
type DatabaseOptionRequest struct { QualifiedDatabaseID dax.QualifiedDatabaseID `json:"qdbid"` Option string `json:"option"` Value string `json:"value"` }
DatabaseOptionRequest represents a change to a database option. The thinking is to only support changing one database option at a time to keep the implementation sane. At time of writing, only WorkersMin is supported.
type DatabasesRequest ¶
type DatabasesRequest struct { OrganizationID dax.OrganizationID `json:"org-id"` DatabaseIDs dax.DatabaseIDs `json:"database-ids"` }
type DeregisterNodesRequest ¶
type Director ¶
type Director struct {
// contains filtered or unexported fields
}
Director is an http implementation of the Director interface.
func NewDirector ¶
func NewDirector(cfg DirectorConfig) *Director
func (*Director) SendDirective ¶
func (*Director) SendSnapshotFieldKeysRequest ¶
func (*Director) SendSnapshotShardDataRequest ¶
func (*Director) SendSnapshotTableKeysRequest ¶
type DirectorConfig ¶
type DropFieldRequest ¶
type DropFieldRequest struct { Table dax.QualifiedTableID `json:"table"` Field dax.FieldName `json:"fields"` }
type IngestPartitionRequest ¶
type IngestPartitionRequest struct { Table dax.QualifiedTableID `json:"table"` Partition dax.PartitionNum `json:"partition"` }
type IngestPartitionResponse ¶
type IngestShardRequest ¶
type IngestShardRequest struct { Table dax.QualifiedTableID `json:"table"` Shard dax.ShardNum `json:"shard"` }
type IngestShardResponse ¶
type RegisterNodesRequest ¶
type SnapshotFieldKeysRequest ¶
type SnapshotFieldKeysRequest struct { Table dax.QualifiedTableID `json:"table"` Field dax.FieldName `json:"field"` }
SnapshotFieldKeysRequest is used to specify the field/keys to snapshot.
type SnapshotShardRequest ¶
type SnapshotShardRequest struct { Table dax.QualifiedTableID `json:"table"` Shard dax.ShardNum `json:"shard"` }
SnapshotShardRequest is used to specify the table/shard to snapshot.
type SnapshotTableKeysRequest ¶
type SnapshotTableKeysRequest struct { Table dax.QualifiedTableID `json:"table"` Partition dax.PartitionNum `json:"partition"` }
SnapshotTableKeysRequest is used to specify the table/partition/keys to snapshot.
type TablesRequest ¶
type TablesRequest struct { OrganizationID dax.OrganizationID `json:"org-id"` DatabaseID dax.DatabaseID `json:"db-id"` TableIDs dax.TableIDs `json:"table-ids"` TableNames dax.TableNames `json:"table-names"` }
type TranslateNodesRequest ¶
type TranslateNodesRequest struct { Table dax.QualifiedTableID `json:"table"` Partitions dax.PartitionNums `json:"partitions"` IsWrite bool `json:"is-write"` }
TranslateNodesRequest is used to specify the table/partitions to consider in the TranslateNodes method call.
type TranslateNodesResponse ¶
type TranslateNodesResponse struct {
TranslateNodes []dax.TranslateNode `json:"translate-nodes"`
}
TranslateNodesResponse contains the list of translate nodes returned based on the table/partitions specified in the TranslateNodeRequest. It's possible that partitions provided are not included in this response. That might happen if there are currently no active translate nodes.