Versions in this module Expand all Collapse all v1 v1.0.1 Jan 10, 2021 v1.0.0 Jan 10, 2021 Changes in this version + var ErrIntOverflowV3Election = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthV3Election = fmt.Errorf("proto: negative length found during unmarshaling") + func RegisterElectionServer(s *grpc.Server, srv ElectionServer) + type CampaignRequest struct + Lease int64 + Name []byte + Value []byte + func (*CampaignRequest) Descriptor() ([]byte, []int) + func (*CampaignRequest) ProtoMessage() + func (m *CampaignRequest) GetLease() int64 + func (m *CampaignRequest) GetName() []byte + func (m *CampaignRequest) GetValue() []byte + func (m *CampaignRequest) Marshal() (dAtA []byte, err error) + func (m *CampaignRequest) MarshalTo(dAtA []byte) (int, error) + func (m *CampaignRequest) Reset() + func (m *CampaignRequest) Size() (n int) + func (m *CampaignRequest) String() string + func (m *CampaignRequest) Unmarshal(dAtA []byte) error + type CampaignResponse struct + Header *etcdserverpb.ResponseHeader + Leader *LeaderKey + func (*CampaignResponse) Descriptor() ([]byte, []int) + func (*CampaignResponse) ProtoMessage() + func (m *CampaignResponse) GetHeader() *etcdserverpb.ResponseHeader + func (m *CampaignResponse) GetLeader() *LeaderKey + func (m *CampaignResponse) Marshal() (dAtA []byte, err error) + func (m *CampaignResponse) MarshalTo(dAtA []byte) (int, error) + func (m *CampaignResponse) Reset() + func (m *CampaignResponse) Size() (n int) + func (m *CampaignResponse) String() string + func (m *CampaignResponse) Unmarshal(dAtA []byte) error + type ElectionClient interface + Campaign func(ctx context.Context, in *CampaignRequest, opts ...grpc.CallOption) (*CampaignResponse, error) + Leader func(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (*LeaderResponse, error) + Observe func(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (Election_ObserveClient, error) + Proclaim func(ctx context.Context, in *ProclaimRequest, opts ...grpc.CallOption) (*ProclaimResponse, error) + Resign func(ctx context.Context, in *ResignRequest, opts ...grpc.CallOption) (*ResignResponse, error) + func NewElectionClient(cc *grpc.ClientConn) ElectionClient + type ElectionServer interface + Campaign func(context.Context, *CampaignRequest) (*CampaignResponse, error) + Leader func(context.Context, *LeaderRequest) (*LeaderResponse, error) + Observe func(*LeaderRequest, Election_ObserveServer) error + Proclaim func(context.Context, *ProclaimRequest) (*ProclaimResponse, error) + Resign func(context.Context, *ResignRequest) (*ResignResponse, error) + type Election_ObserveClient interface + Recv func() (*LeaderResponse, error) + type Election_ObserveServer interface + Send func(*LeaderResponse) error + type LeaderKey struct + Key []byte + Lease int64 + Name []byte + Rev int64 + func (*LeaderKey) Descriptor() ([]byte, []int) + func (*LeaderKey) ProtoMessage() + func (m *LeaderKey) GetKey() []byte + func (m *LeaderKey) GetLease() int64 + func (m *LeaderKey) GetName() []byte + func (m *LeaderKey) GetRev() int64 + func (m *LeaderKey) Marshal() (dAtA []byte, err error) + func (m *LeaderKey) MarshalTo(dAtA []byte) (int, error) + func (m *LeaderKey) Reset() + func (m *LeaderKey) Size() (n int) + func (m *LeaderKey) String() string + func (m *LeaderKey) Unmarshal(dAtA []byte) error + type LeaderRequest struct + Name []byte + func (*LeaderRequest) Descriptor() ([]byte, []int) + func (*LeaderRequest) ProtoMessage() + func (m *LeaderRequest) GetName() []byte + func (m *LeaderRequest) Marshal() (dAtA []byte, err error) + func (m *LeaderRequest) MarshalTo(dAtA []byte) (int, error) + func (m *LeaderRequest) Reset() + func (m *LeaderRequest) Size() (n int) + func (m *LeaderRequest) String() string + func (m *LeaderRequest) Unmarshal(dAtA []byte) error + type LeaderResponse struct + Header *etcdserverpb.ResponseHeader + Kv *mvccpb.KeyValue + func (*LeaderResponse) Descriptor() ([]byte, []int) + func (*LeaderResponse) ProtoMessage() + func (m *LeaderResponse) GetHeader() *etcdserverpb.ResponseHeader + func (m *LeaderResponse) GetKv() *mvccpb.KeyValue + func (m *LeaderResponse) Marshal() (dAtA []byte, err error) + func (m *LeaderResponse) MarshalTo(dAtA []byte) (int, error) + func (m *LeaderResponse) Reset() + func (m *LeaderResponse) Size() (n int) + func (m *LeaderResponse) String() string + func (m *LeaderResponse) Unmarshal(dAtA []byte) error + type ProclaimRequest struct + Leader *LeaderKey + Value []byte + func (*ProclaimRequest) Descriptor() ([]byte, []int) + func (*ProclaimRequest) ProtoMessage() + func (m *ProclaimRequest) GetLeader() *LeaderKey + func (m *ProclaimRequest) GetValue() []byte + func (m *ProclaimRequest) Marshal() (dAtA []byte, err error) + func (m *ProclaimRequest) MarshalTo(dAtA []byte) (int, error) + func (m *ProclaimRequest) Reset() + func (m *ProclaimRequest) Size() (n int) + func (m *ProclaimRequest) String() string + func (m *ProclaimRequest) Unmarshal(dAtA []byte) error + type ProclaimResponse struct + Header *etcdserverpb.ResponseHeader + func (*ProclaimResponse) Descriptor() ([]byte, []int) + func (*ProclaimResponse) ProtoMessage() + func (m *ProclaimResponse) GetHeader() *etcdserverpb.ResponseHeader + func (m *ProclaimResponse) Marshal() (dAtA []byte, err error) + func (m *ProclaimResponse) MarshalTo(dAtA []byte) (int, error) + func (m *ProclaimResponse) Reset() + func (m *ProclaimResponse) Size() (n int) + func (m *ProclaimResponse) String() string + func (m *ProclaimResponse) Unmarshal(dAtA []byte) error + type ResignRequest struct + Leader *LeaderKey + func (*ResignRequest) Descriptor() ([]byte, []int) + func (*ResignRequest) ProtoMessage() + func (m *ResignRequest) GetLeader() *LeaderKey + func (m *ResignRequest) Marshal() (dAtA []byte, err error) + func (m *ResignRequest) MarshalTo(dAtA []byte) (int, error) + func (m *ResignRequest) Reset() + func (m *ResignRequest) Size() (n int) + func (m *ResignRequest) String() string + func (m *ResignRequest) Unmarshal(dAtA []byte) error + type ResignResponse struct + Header *etcdserverpb.ResponseHeader + func (*ResignResponse) Descriptor() ([]byte, []int) + func (*ResignResponse) ProtoMessage() + func (m *ResignResponse) GetHeader() *etcdserverpb.ResponseHeader + func (m *ResignResponse) Marshal() (dAtA []byte, err error) + func (m *ResignResponse) MarshalTo(dAtA []byte) (int, error) + func (m *ResignResponse) Reset() + func (m *ResignResponse) Size() (n int) + func (m *ResignResponse) String() string + func (m *ResignResponse) Unmarshal(dAtA []byte) error