Documentation ¶
Index ¶
- Constants
- Variables
- type APIClient
- func (client *APIClient) AddRelay(ctx context.Context, relayID string) error
- func (client *APIClient) AddSite(ctx context.Context, siteID string) error
- func (client *APIClient) Batch(ctx context.Context, siteID string, bucket string, batch Batch) (int, int, error)
- func (client *APIClient) ClusterOverview(ctx context.Context) (routes.ClusterOverview, error)
- func (client *APIClient) DownloadSnapshot(ctx context.Context, uuid string) (io.ReadCloser, error)
- func (client *APIClient) Get(ctx context.Context, siteID string, bucket string, keys []string) ([]Entry, error)
- func (client *APIClient) GetMatches(ctx context.Context, siteID string, bucket string, keys []string) (EntryIterator, error)
- func (client *APIClient) GetSnapshot(ctx context.Context, uuid string) (routes.Snapshot, error)
- func (client *APIClient) LogDump(ctx context.Context) (routes.LogDump, error)
- func (client *APIClient) MoveRelay(ctx context.Context, relayID string, siteID string) error
- func (client *APIClient) RelayStatus(ctx context.Context, relayID string) (routes.RelayStatus, error)
- func (client *APIClient) RemoveRelay(ctx context.Context, relayID string) error
- func (client *APIClient) RemoveSite(ctx context.Context, siteID string) error
- func (client *APIClient) Snapshot(ctx context.Context) (routes.Snapshot, error)
- type APIClientConfig
- type Batch
- type Client
- func (client *Client) AddNode(ctx context.Context, memberAddress PeerAddress, newMemberConfig NodeConfig) error
- func (client *Client) DecommissionNode(ctx context.Context, memberAddress PeerAddress, nodeID uint64) error
- func (client *Client) ForceRemoveNode(ctx context.Context, memberAddress PeerAddress, nodeID uint64) error
- func (client *Client) MerkleTreeNode(ctx context.Context, memberAddress PeerAddress, siteID string, ...) (rest.MerkleNode, error)
- func (client *Client) MerkleTreeNodeKeys(ctx context.Context, memberAddress PeerAddress, siteID string, ...) (rest.MerkleKeys, error)
- func (client *Client) MerkleTreeStats(ctx context.Context, memberAddress PeerAddress, siteID string, ...) (rest.MerkleTree, error)
- func (client *Client) RemoveNode(ctx context.Context, memberAddress PeerAddress, nodeID uint64, ...) error
- func (client *Client) ReplaceNode(ctx context.Context, memberAddress PeerAddress, nodeID uint64, ...) error
- type ClientConfig
- type Entry
- type EntryIterator
- type ErrorStatusCode
Constants ¶
const DefaultClientTimeout = time.Second * 10
Variables ¶
var EClientTimeout = errors.New("Client request timed out")
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
func New ¶
func New(config APIClientConfig) *APIClient
func (*APIClient) ClusterOverview ¶
func (*APIClient) DownloadSnapshot ¶
func (*APIClient) GetMatches ¶
func (*APIClient) GetSnapshot ¶
func (*APIClient) RelayStatus ¶
func (*APIClient) RemoveRelay ¶
func (*APIClient) RemoveSite ¶
type APIClientConfig ¶
type APIClientConfig struct {
Servers []string
}
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Contains a database update operation
func (*Batch) Put ¶
Adds a key put operation to this update. Key and value are the key that is being modified and the value that it should be set to. context is the causal context for the modification. It can be left blank if
func (*Batch) ToTransportUpdateBatch ¶
func (batch *Batch) ToTransportUpdateBatch() transport.TransportUpdateBatch
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(config ClientConfig) *Client
func (*Client) AddNode ¶
func (client *Client) AddNode(ctx context.Context, memberAddress PeerAddress, newMemberConfig NodeConfig) error
Use an existing cluster member to bootstrap the addition of another node to that cluster. host and port indicate the address of the existing cluster member while nodeAddress contains the ID, host name and port of the new cluster member
Return Values:
EClientTimeout: The request to the node timed out
func (*Client) DecommissionNode ¶
func (*Client) ForceRemoveNode ¶
func (*Client) MerkleTreeNode ¶
func (*Client) MerkleTreeNodeKeys ¶
func (*Client) MerkleTreeStats ¶
func (*Client) RemoveNode ¶
func (client *Client) RemoveNode(ctx context.Context, memberAddress PeerAddress, nodeID uint64, replacementNodeID uint64, decommission, forwarded bool) error
Ask a cluster member to initiate the removal of some node from its cluster. host and port indicate the address of the initiator node while nodeID is the ID of the node that should be removed.
Return Values:
EClientTimeout: The request to the node timed out
type ClientConfig ¶
type EntryIterator ¶
type EntryIterator struct {
// contains filtered or unexported fields
}
func (*EntryIterator) Entry ¶
func (iter *EntryIterator) Entry() Entry
func (*EntryIterator) Key ¶
func (iter *EntryIterator) Key() string
func (*EntryIterator) Next ¶
func (iter *EntryIterator) Next() bool
func (*EntryIterator) Prefix ¶
func (iter *EntryIterator) Prefix() string
type ErrorStatusCode ¶
func (*ErrorStatusCode) Error ¶
func (errorStatus *ErrorStatusCode) Error() string