http

package
v3.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotImplemented = errors.New(errors.ErrUncoded, "not implemented")

Functions

func Handler

func Handler(mds *mds.MDS) 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 (m *AddressManager) AddAddresses(ctx context.Context, addr ...dax.Address) error

func (*AddressManager) RemoveAddresses

func (m *AddressManager) RemoveAddresses(ctx context.Context, addrs ...dax.Address) error

type CheckInNodeRequest

type CheckInNodeRequest struct {
	Address dax.Address `json:"address"`

	// RoleTypes allows a registering node to specify which role type(s) it is
	// capable of filling. The controller will not assign a role to this node
	// with a type not included in RoleTypes.
	RoleTypes []dax.RoleType `json:"role-types"`
}

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 []controller.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 CreateFieldRequest struct {
	TableKey dax.TableKey `json:"table-key"`
	Field    *dax.Field   `json:"field"`
}

type CreateTableResponse

type CreateTableResponse dax.QualifiedTable

type DeregisterNodesRequest

type DeregisterNodesRequest struct {
	Addresses []dax.Address `json:"addresses"`
}

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 IngestPartitionResponse struct {
	Address dax.Address `json:"address"`
}

type IngestShardRequest

type IngestShardRequest struct {
	Table dax.QualifiedTableID `json:"table"`
	Shard dax.ShardNum         `json:"shard"`
}

type IngestShardResponse

type IngestShardResponse struct {
	Address dax.Address `json:"address"`
}

type RegisterNodeRequest

type RegisterNodeRequest struct {
	Address dax.Address `json:"address"`

	// RoleTypes allows a registering node to specify which role type(s) it is
	// capable of filling. The controller will not assign a role to this node
	// with a type not included in RoleTypes.
	RoleTypes []dax.RoleType `json:"role-types"`
}

type RegisterNodesRequest

type RegisterNodesRequest struct {
	Nodes []*dax.Node `json:"nodes"`
}

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 []controller.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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL