Documentation ¶
Overview ¶
Package v3rpc implements etcd v3 RPC system based on gRPC.
Index ¶
- Variables
- func NewKVServer(s *etcdserver.EtcdServer) pb.KVServer
- func NewLeaseServer(le etcdserver.Lessor) pb.LeaseServer
- func NewWatchServer(s *etcdserver.EtcdServer) pb.WatchServer
- type ClusterServer
- func (cs *ClusterServer) MemberAdd(ctx context.Context, r *pb.MemberAddRequest) (*pb.MemberAddResponse, error)
- func (cs *ClusterServer) MemberList(ctx context.Context, r *pb.MemberListRequest) (*pb.MemberListResponse, error)
- func (cs *ClusterServer) MemberRemove(ctx context.Context, r *pb.MemberRemoveRequest) (*pb.MemberRemoveResponse, error)
- func (cs *ClusterServer) MemberUpdate(ctx context.Context, r *pb.MemberUpdateRequest) (*pb.MemberUpdateResponse, error)
- type LeaseServer
- func (ls *LeaseServer) LeaseCreate(ctx context.Context, cr *pb.LeaseCreateRequest) (*pb.LeaseCreateResponse, error)
- func (ls *LeaseServer) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error
- func (ls *LeaseServer) LeaseRevoke(ctx context.Context, rr *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmptyKey = grpc.Errorf(codes.InvalidArgument, "key is not provided") ErrTooManyOps = grpc.Errorf(codes.InvalidArgument, "too many operations in txn request") ErrCompacted = grpc.Errorf(codes.OutOfRange, storage.ErrCompacted.Error()) ErrFutureRev = grpc.Errorf(codes.OutOfRange, storage.ErrFutureRev.Error()) ErrLeaseNotFound = grpc.Errorf(codes.NotFound, "requested lease not found") ErrMemberExist = grpc.Errorf(codes.FailedPrecondition, "member ID already exist") ErrPeerURLExist = grpc.Errorf(codes.FailedPrecondition, "Peer URLs already exists") ErrMemberBadURLs = grpc.Errorf(codes.InvalidArgument, "given member URLs are invalid") ErrMemberNotFound = grpc.Errorf(codes.NotFound, "member not found") )
View Source
var ( // Max operations per txn list. For example, Txn.Success can have at most 128 operations, // and Txn.Failure can have at most 128 operations. MaxOpsPerTxn = 128 )
Functions ¶
func NewKVServer ¶
func NewKVServer(s *etcdserver.EtcdServer) pb.KVServer
func NewLeaseServer ¶
func NewLeaseServer(le etcdserver.Lessor) pb.LeaseServer
func NewWatchServer ¶
func NewWatchServer(s *etcdserver.EtcdServer) pb.WatchServer
Types ¶
type ClusterServer ¶
type ClusterServer struct {
// contains filtered or unexported fields
}
func NewClusterServer ¶
func NewClusterServer(s *etcdserver.EtcdServer) *ClusterServer
func (*ClusterServer) MemberAdd ¶
func (cs *ClusterServer) MemberAdd(ctx context.Context, r *pb.MemberAddRequest) (*pb.MemberAddResponse, error)
func (*ClusterServer) MemberList ¶
func (cs *ClusterServer) MemberList(ctx context.Context, r *pb.MemberListRequest) (*pb.MemberListResponse, error)
func (*ClusterServer) MemberRemove ¶
func (cs *ClusterServer) MemberRemove(ctx context.Context, r *pb.MemberRemoveRequest) (*pb.MemberRemoveResponse, error)
func (*ClusterServer) MemberUpdate ¶
func (cs *ClusterServer) MemberUpdate(ctx context.Context, r *pb.MemberUpdateRequest) (*pb.MemberUpdateResponse, error)
type LeaseServer ¶
type LeaseServer struct {
// contains filtered or unexported fields
}
func (*LeaseServer) LeaseCreate ¶
func (ls *LeaseServer) LeaseCreate(ctx context.Context, cr *pb.LeaseCreateRequest) (*pb.LeaseCreateResponse, error)
func (*LeaseServer) LeaseKeepAlive ¶
func (ls *LeaseServer) LeaseKeepAlive(stream pb.Lease_LeaseKeepAliveServer) error
func (*LeaseServer) LeaseRevoke ¶
func (ls *LeaseServer) LeaseRevoke(ctx context.Context, rr *pb.LeaseRevokeRequest) (*pb.LeaseRevokeResponse, error)
Click to show internal directories.
Click to hide internal directories.