Documentation ¶
Index ¶
- Variables
- type Backend
- type Event
- type KVServerBridge
- func (s *KVServerBridge) Alarm(context.Context, *etcdserverpb.AlarmRequest) (*etcdserverpb.AlarmResponse, error)
- func (k *KVServerBridge) Compact(ctx context.Context, r *etcdserverpb.CompactionRequest) (*etcdserverpb.CompactionResponse, error)
- func (s *KVServerBridge) Defragment(context.Context, *etcdserverpb.DefragmentRequest) (*etcdserverpb.DefragmentResponse, error)
- func (k *KVServerBridge) DeleteRange(ctx context.Context, r *etcdserverpb.DeleteRangeRequest) (*etcdserverpb.DeleteRangeResponse, error)
- func (s *KVServerBridge) Downgrade(context.Context, *etcdserverpb.DowngradeRequest) (*etcdserverpb.DowngradeResponse, error)
- func (s *KVServerBridge) Hash(context.Context, *etcdserverpb.HashRequest) (*etcdserverpb.HashResponse, error)
- func (s *KVServerBridge) HashKV(context.Context, *etcdserverpb.HashKVRequest) (*etcdserverpb.HashKVResponse, error)
- func (s *KVServerBridge) LeaseGrant(ctx context.Context, req *etcdserverpb.LeaseGrantRequest) (*etcdserverpb.LeaseGrantResponse, error)
- func (s *KVServerBridge) LeaseKeepAlive(etcdserverpb.Lease_LeaseKeepAliveServer) error
- func (s *KVServerBridge) LeaseLeases(context.Context, *etcdserverpb.LeaseLeasesRequest) (*etcdserverpb.LeaseLeasesResponse, error)
- func (s *KVServerBridge) LeaseRevoke(context.Context, *etcdserverpb.LeaseRevokeRequest) (*etcdserverpb.LeaseRevokeResponse, error)
- func (s *KVServerBridge) LeaseTimeToLive(context.Context, *etcdserverpb.LeaseTimeToLiveRequest) (*etcdserverpb.LeaseTimeToLiveResponse, error)
- func (s *KVServerBridge) MoveLeader(context.Context, *etcdserverpb.MoveLeaderRequest) (*etcdserverpb.MoveLeaderResponse, error)
- func (k *KVServerBridge) Put(ctx context.Context, r *etcdserverpb.PutRequest) (*etcdserverpb.PutResponse, error)
- func (k *KVServerBridge) Range(ctx context.Context, r *etcdserverpb.RangeRequest) (*etcdserverpb.RangeResponse, error)
- func (k *KVServerBridge) Register(server *grpc.Server)
- func (s *KVServerBridge) Snapshot(*etcdserverpb.SnapshotRequest, etcdserverpb.Maintenance_SnapshotServer) error
- func (s *KVServerBridge) Status(ctx context.Context, r *etcdserverpb.StatusRequest) (*etcdserverpb.StatusResponse, error)
- func (k *KVServerBridge) Txn(ctx context.Context, r *etcdserverpb.TxnRequest) (*etcdserverpb.TxnResponse, error)
- func (s *KVServerBridge) Watch(ws etcdserverpb.Watch_WatchServer) error
- type KeyValue
- type LimitedServer
- type RangeResponse
- type ResponseHeader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyExists = rpctypes.ErrGRPCDuplicateKey ErrCompacted = rpctypes.ErrGRPCCompacted )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Start(ctx context.Context) error Wait() Get(ctx context.Context, key, rangeEnd string, limit, revision int64) (int64, *KeyValue, error) Create(ctx context.Context, key string, value []byte, lease int64) (int64, bool, error) Delete(ctx context.Context, key string, revision int64) (int64, bool, error) List(ctx context.Context, prefix, startKey string, limit, revision int64) (int64, []*KeyValue, error) Count(ctx context.Context, prefix, startKey string, revision int64) (int64, int64, error) Update(ctx context.Context, key string, value []byte, revision, lease int64) (int64, bool, error) Watch(ctx context.Context, key string, revision int64) <-chan []*Event DbSize(ctx context.Context) (int64, error) DoCompact(ctx context.Context) error }
type KVServerBridge ¶
type KVServerBridge struct {
// contains filtered or unexported fields
}
func New ¶
func New(backend Backend) *KVServerBridge
func (*KVServerBridge) Alarm ¶
func (s *KVServerBridge) Alarm(context.Context, *etcdserverpb.AlarmRequest) (*etcdserverpb.AlarmResponse, error)
func (*KVServerBridge) Compact ¶
func (k *KVServerBridge) Compact(ctx context.Context, r *etcdserverpb.CompactionRequest) (*etcdserverpb.CompactionResponse, error)
func (*KVServerBridge) Defragment ¶
func (s *KVServerBridge) Defragment(context.Context, *etcdserverpb.DefragmentRequest) (*etcdserverpb.DefragmentResponse, error)
func (*KVServerBridge) DeleteRange ¶
func (k *KVServerBridge) DeleteRange(ctx context.Context, r *etcdserverpb.DeleteRangeRequest) (*etcdserverpb.DeleteRangeResponse, error)
func (*KVServerBridge) Downgrade ¶
func (s *KVServerBridge) Downgrade(context.Context, *etcdserverpb.DowngradeRequest) (*etcdserverpb.DowngradeResponse, error)
func (*KVServerBridge) Hash ¶
func (s *KVServerBridge) Hash(context.Context, *etcdserverpb.HashRequest) (*etcdserverpb.HashResponse, error)
func (*KVServerBridge) HashKV ¶
func (s *KVServerBridge) HashKV(context.Context, *etcdserverpb.HashKVRequest) (*etcdserverpb.HashKVResponse, error)
func (*KVServerBridge) LeaseGrant ¶
func (s *KVServerBridge) LeaseGrant(ctx context.Context, req *etcdserverpb.LeaseGrantRequest) (*etcdserverpb.LeaseGrantResponse, error)
func (*KVServerBridge) LeaseKeepAlive ¶
func (s *KVServerBridge) LeaseKeepAlive(etcdserverpb.Lease_LeaseKeepAliveServer) error
func (*KVServerBridge) LeaseLeases ¶
func (s *KVServerBridge) LeaseLeases(context.Context, *etcdserverpb.LeaseLeasesRequest) (*etcdserverpb.LeaseLeasesResponse, error)
func (*KVServerBridge) LeaseRevoke ¶
func (s *KVServerBridge) LeaseRevoke(context.Context, *etcdserverpb.LeaseRevokeRequest) (*etcdserverpb.LeaseRevokeResponse, error)
func (*KVServerBridge) LeaseTimeToLive ¶
func (s *KVServerBridge) LeaseTimeToLive(context.Context, *etcdserverpb.LeaseTimeToLiveRequest) (*etcdserverpb.LeaseTimeToLiveResponse, error)
func (*KVServerBridge) MoveLeader ¶
func (s *KVServerBridge) MoveLeader(context.Context, *etcdserverpb.MoveLeaderRequest) (*etcdserverpb.MoveLeaderResponse, error)
func (*KVServerBridge) Put ¶
func (k *KVServerBridge) Put(ctx context.Context, r *etcdserverpb.PutRequest) (*etcdserverpb.PutResponse, error)
func (*KVServerBridge) Range ¶
func (k *KVServerBridge) Range(ctx context.Context, r *etcdserverpb.RangeRequest) (*etcdserverpb.RangeResponse, error)
func (*KVServerBridge) Register ¶
func (k *KVServerBridge) Register(server *grpc.Server)
func (*KVServerBridge) Snapshot ¶
func (s *KVServerBridge) Snapshot(*etcdserverpb.SnapshotRequest, etcdserverpb.Maintenance_SnapshotServer) error
func (*KVServerBridge) Status ¶
func (s *KVServerBridge) Status(ctx context.Context, r *etcdserverpb.StatusRequest) (*etcdserverpb.StatusResponse, error)
func (*KVServerBridge) Txn ¶
func (k *KVServerBridge) Txn(ctx context.Context, r *etcdserverpb.TxnRequest) (*etcdserverpb.TxnResponse, error)
func (*KVServerBridge) Watch ¶
func (s *KVServerBridge) Watch(ws etcdserverpb.Watch_WatchServer) error
type LimitedServer ¶
type LimitedServer struct {
// contains filtered or unexported fields
}
func (*LimitedServer) Range ¶
func (l *LimitedServer) Range(ctx context.Context, r *etcdserverpb.RangeRequest) (*RangeResponse, error)
func (*LimitedServer) Txn ¶
func (l *LimitedServer) Txn(ctx context.Context, txn *etcdserverpb.TxnRequest) (*etcdserverpb.TxnResponse, error)
type RangeResponse ¶
type RangeResponse struct { Header *etcdserverpb.ResponseHeader Kvs []*KeyValue More bool Count int64 }
type ResponseHeader ¶
type ResponseHeader struct {
Revision int64
}
Click to show internal directories.
Click to hide internal directories.