Documentation
¶
Index ¶
- func NewEtcdEmbedConfig(ctx *Context) (*embed.Config, error)
- type Client
- func (c *Client) Close()
- func (c *Client) Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
- func (c *Client) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
- func (c *Client) GetBackupMeta(key polypb.BackupMetaKey) (polypb.BackupMetaSlice, error)
- func (c *Client) GetNodeMeta(key polypb.NodeMetaKey) ([]*polypb.NodeMeta, error)
- func (c *Client) Locker(key string) sync.Locker
- func (c *Client) Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
- func (c *Client) PutBackupMeta(key polypb.BackupMetaKey, meta *polypb.BackupMeta) error
- func (c *Client) PutNodeMeta(key polypb.NodeMetaKey, meta *polypb.NodeMeta) error
- func (c *Client) RemoveBackupMeta(key polypb.BackupMetaKey) error
- func (c *Client) RemoveNodeMeta(key polypb.NodeMetaKey) error
- func (c *Client) UpdateLSN(key polypb.BackupMetaKey, lsn string) error
- type ClientAPI
- type Context
- type EtcdServer
- type FakeClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetBackupMeta ¶
func (c *Client) GetBackupMeta(key polypb.BackupMetaKey) (polypb.BackupMetaSlice, error)
func (*Client) GetNodeMeta ¶
func (*Client) PutBackupMeta ¶
func (c *Client) PutBackupMeta(key polypb.BackupMetaKey, meta *polypb.BackupMeta) error
func (*Client) PutNodeMeta ¶
func (*Client) RemoveBackupMeta ¶
func (c *Client) RemoveBackupMeta(key polypb.BackupMetaKey) error
func (*Client) RemoveNodeMeta ¶
func (c *Client) RemoveNodeMeta(key polypb.NodeMetaKey) error
type ClientAPI ¶
type ClientAPI interface {
GetBackupMeta(key polypb.BackupMetaKey) (polypb.BackupMetaSlice, error)
PutBackupMeta(key polypb.BackupMetaKey, meta *polypb.BackupMeta) error
RemoveBackupMeta(key polypb.BackupMetaKey) error
UpdateLSN(key polypb.BackupMetaKey, lsn string) error
GetNodeMeta(key polypb.NodeMetaKey) ([]*polypb.NodeMeta, error)
PutNodeMeta(key polypb.NodeMetaKey, meta *polypb.NodeMeta) error
RemoveNodeMeta(key polypb.NodeMetaKey) error
//Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error)
//Put(ctx context.Context, key, val string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error)
//Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error)
//Locker(key string) sync.Locker
Close()
}
type Context ¶
type EtcdServer ¶
type EtcdServer struct {
Server *embed.Etcd
ClientPort string
// contains filtered or unexported fields
}
func NewEtcdServer ¶
func NewEtcdServer(cfg *embed.Config) (*EtcdServer, error)
func (*EtcdServer) Close ¶
func (e *EtcdServer) Close()
type FakeClient ¶
type FakeClient struct {
}
Click to show internal directories.
Click to hide internal directories.