etcd: github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb Index | Files | Directories

package v3electionpb

import "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb"

Package v3electionpb is a generated protocol buffer package.

It is generated from these files:

v3election.proto

It has these top-level messages:

CampaignRequest
CampaignResponse
LeaderKey
LeaderRequest
LeaderResponse
ResignRequest
ResignResponse
ProclaimRequest
ProclaimResponse

Index

Package Files

v3election.pb.go

Variables

var (
    ErrInvalidLengthV3Election = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowV3Election   = fmt.Errorf("proto: integer overflow")
)

func RegisterElectionServer Uses

func RegisterElectionServer(s *grpc.Server, srv ElectionServer)

type CampaignRequest Uses

type CampaignRequest struct {
    // name is the election's identifier for the campaign.
    Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // lease is the ID of the lease attached to leadership of the election. If the
    // lease expires or is revoked before resigning leadership, then the
    // leadership is transferred to the next campaigner, if any.
    Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
    // value is the initial proclaimed value set when the campaigner wins the
    // election.
    Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}

func (*CampaignRequest) Descriptor Uses

func (*CampaignRequest) Descriptor() ([]byte, []int)

func (*CampaignRequest) GetLease Uses

func (m *CampaignRequest) GetLease() int64

func (*CampaignRequest) GetName Uses

func (m *CampaignRequest) GetName() []byte

func (*CampaignRequest) GetValue Uses

func (m *CampaignRequest) GetValue() []byte

func (*CampaignRequest) Marshal Uses

func (m *CampaignRequest) Marshal() (dAtA []byte, err error)

func (*CampaignRequest) MarshalTo Uses

func (m *CampaignRequest) MarshalTo(dAtA []byte) (int, error)

func (*CampaignRequest) ProtoMessage Uses

func (*CampaignRequest) ProtoMessage()

func (*CampaignRequest) Reset Uses

func (m *CampaignRequest) Reset()

func (*CampaignRequest) Size Uses

func (m *CampaignRequest) Size() (n int)

func (*CampaignRequest) String Uses

func (m *CampaignRequest) String() string

func (*CampaignRequest) Unmarshal Uses

func (m *CampaignRequest) Unmarshal(dAtA []byte) error

type CampaignResponse Uses

type CampaignResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
    // leader describes the resources used for holding leadereship of the election.
    Leader *LeaderKey `protobuf:"bytes,2,opt,name=leader" json:"leader,omitempty"`
}

func (*CampaignResponse) Descriptor Uses

func (*CampaignResponse) Descriptor() ([]byte, []int)

func (*CampaignResponse) GetHeader Uses

func (m *CampaignResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*CampaignResponse) GetLeader Uses

func (m *CampaignResponse) GetLeader() *LeaderKey

func (*CampaignResponse) Marshal Uses

func (m *CampaignResponse) Marshal() (dAtA []byte, err error)

func (*CampaignResponse) MarshalTo Uses

func (m *CampaignResponse) MarshalTo(dAtA []byte) (int, error)

func (*CampaignResponse) ProtoMessage Uses

func (*CampaignResponse) ProtoMessage()

func (*CampaignResponse) Reset Uses

func (m *CampaignResponse) Reset()

func (*CampaignResponse) Size Uses

func (m *CampaignResponse) Size() (n int)

func (*CampaignResponse) String Uses

func (m *CampaignResponse) String() string

func (*CampaignResponse) Unmarshal Uses

func (m *CampaignResponse) Unmarshal(dAtA []byte) error

type ElectionClient Uses

type ElectionClient interface {
    // Campaign waits to acquire leadership in an election, returning a LeaderKey
    // representing the leadership if successful. The LeaderKey can then be used
    // to issue new values on the election, transactionally guard API requests on
    // leadership still being held, and resign from the election.
    Campaign(ctx context.Context, in *CampaignRequest, opts ...grpc.CallOption) (*CampaignResponse, error)
    // Proclaim updates the leader's posted value with a new value.
    Proclaim(ctx context.Context, in *ProclaimRequest, opts ...grpc.CallOption) (*ProclaimResponse, error)
    // Leader returns the current election proclamation, if any.
    Leader(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (*LeaderResponse, error)
    // Observe streams election proclamations in-order as made by the election's
    // elected leaders.
    Observe(ctx context.Context, in *LeaderRequest, opts ...grpc.CallOption) (Election_ObserveClient, error)
    // Resign releases election leadership so other campaigners may acquire
    // leadership on the election.
    Resign(ctx context.Context, in *ResignRequest, opts ...grpc.CallOption) (*ResignResponse, error)
}

func NewElectionClient Uses

func NewElectionClient(cc *grpc.ClientConn) ElectionClient

type ElectionServer Uses

type ElectionServer interface {
    // Campaign waits to acquire leadership in an election, returning a LeaderKey
    // representing the leadership if successful. The LeaderKey can then be used
    // to issue new values on the election, transactionally guard API requests on
    // leadership still being held, and resign from the election.
    Campaign(context.Context, *CampaignRequest) (*CampaignResponse, error)
    // Proclaim updates the leader's posted value with a new value.
    Proclaim(context.Context, *ProclaimRequest) (*ProclaimResponse, error)
    // Leader returns the current election proclamation, if any.
    Leader(context.Context, *LeaderRequest) (*LeaderResponse, error)
    // Observe streams election proclamations in-order as made by the election's
    // elected leaders.
    Observe(*LeaderRequest, Election_ObserveServer) error
    // Resign releases election leadership so other campaigners may acquire
    // leadership on the election.
    Resign(context.Context, *ResignRequest) (*ResignResponse, error)
}

type Election_ObserveClient Uses

type Election_ObserveClient interface {
    Recv() (*LeaderResponse, error)
    grpc.ClientStream
}

type Election_ObserveServer Uses

type Election_ObserveServer interface {
    Send(*LeaderResponse) error
    grpc.ServerStream
}

type LeaderKey Uses

type LeaderKey struct {
    // name is the election identifier that correponds to the leadership key.
    Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    // key is an opaque key representing the ownership of the election. If the key
    // is deleted, then leadership is lost.
    Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
    // rev is the creation revision of the key. It can be used to test for ownership
    // of an election during transactions by testing the key's creation revision
    // matches rev.
    Rev int64 `protobuf:"varint,3,opt,name=rev,proto3" json:"rev,omitempty"`
    // lease is the lease ID of the election leader.
    Lease int64 `protobuf:"varint,4,opt,name=lease,proto3" json:"lease,omitempty"`
}

func (*LeaderKey) Descriptor Uses

func (*LeaderKey) Descriptor() ([]byte, []int)

func (*LeaderKey) GetKey Uses

func (m *LeaderKey) GetKey() []byte

func (*LeaderKey) GetLease Uses

func (m *LeaderKey) GetLease() int64

func (*LeaderKey) GetName Uses

func (m *LeaderKey) GetName() []byte

func (*LeaderKey) GetRev Uses

func (m *LeaderKey) GetRev() int64

func (*LeaderKey) Marshal Uses

func (m *LeaderKey) Marshal() (dAtA []byte, err error)

func (*LeaderKey) MarshalTo Uses

func (m *LeaderKey) MarshalTo(dAtA []byte) (int, error)

func (*LeaderKey) ProtoMessage Uses

func (*LeaderKey) ProtoMessage()

func (*LeaderKey) Reset Uses

func (m *LeaderKey) Reset()

func (*LeaderKey) Size Uses

func (m *LeaderKey) Size() (n int)

func (*LeaderKey) String Uses

func (m *LeaderKey) String() string

func (*LeaderKey) Unmarshal Uses

func (m *LeaderKey) Unmarshal(dAtA []byte) error

type LeaderRequest Uses

type LeaderRequest struct {
    // name is the election identifier for the leadership information.
    Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

func (*LeaderRequest) Descriptor Uses

func (*LeaderRequest) Descriptor() ([]byte, []int)

func (*LeaderRequest) GetName Uses

func (m *LeaderRequest) GetName() []byte

func (*LeaderRequest) Marshal Uses

func (m *LeaderRequest) Marshal() (dAtA []byte, err error)

func (*LeaderRequest) MarshalTo Uses

func (m *LeaderRequest) MarshalTo(dAtA []byte) (int, error)

func (*LeaderRequest) ProtoMessage Uses

func (*LeaderRequest) ProtoMessage()

func (*LeaderRequest) Reset Uses

func (m *LeaderRequest) Reset()

func (*LeaderRequest) Size Uses

func (m *LeaderRequest) Size() (n int)

func (*LeaderRequest) String Uses

func (m *LeaderRequest) String() string

func (*LeaderRequest) Unmarshal Uses

func (m *LeaderRequest) Unmarshal(dAtA []byte) error

type LeaderResponse Uses

type LeaderResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
    // kv is the key-value pair representing the latest leader update.
    Kv  *mvccpb.KeyValue `protobuf:"bytes,2,opt,name=kv" json:"kv,omitempty"`
}

func (*LeaderResponse) Descriptor Uses

func (*LeaderResponse) Descriptor() ([]byte, []int)

func (*LeaderResponse) GetHeader Uses

func (m *LeaderResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*LeaderResponse) GetKv Uses

func (m *LeaderResponse) GetKv() *mvccpb.KeyValue

func (*LeaderResponse) Marshal Uses

func (m *LeaderResponse) Marshal() (dAtA []byte, err error)

func (*LeaderResponse) MarshalTo Uses

func (m *LeaderResponse) MarshalTo(dAtA []byte) (int, error)

func (*LeaderResponse) ProtoMessage Uses

func (*LeaderResponse) ProtoMessage()

func (*LeaderResponse) Reset Uses

func (m *LeaderResponse) Reset()

func (*LeaderResponse) Size Uses

func (m *LeaderResponse) Size() (n int)

func (*LeaderResponse) String Uses

func (m *LeaderResponse) String() string

func (*LeaderResponse) Unmarshal Uses

func (m *LeaderResponse) Unmarshal(dAtA []byte) error

type ProclaimRequest Uses

type ProclaimRequest struct {
    // leader is the leadership hold on the election.
    Leader *LeaderKey `protobuf:"bytes,1,opt,name=leader" json:"leader,omitempty"`
    // value is an update meant to overwrite the leader's current value.
    Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

func (*ProclaimRequest) Descriptor Uses

func (*ProclaimRequest) Descriptor() ([]byte, []int)

func (*ProclaimRequest) GetLeader Uses

func (m *ProclaimRequest) GetLeader() *LeaderKey

func (*ProclaimRequest) GetValue Uses

func (m *ProclaimRequest) GetValue() []byte

func (*ProclaimRequest) Marshal Uses

func (m *ProclaimRequest) Marshal() (dAtA []byte, err error)

func (*ProclaimRequest) MarshalTo Uses

func (m *ProclaimRequest) MarshalTo(dAtA []byte) (int, error)

func (*ProclaimRequest) ProtoMessage Uses

func (*ProclaimRequest) ProtoMessage()

func (*ProclaimRequest) Reset Uses

func (m *ProclaimRequest) Reset()

func (*ProclaimRequest) Size Uses

func (m *ProclaimRequest) Size() (n int)

func (*ProclaimRequest) String Uses

func (m *ProclaimRequest) String() string

func (*ProclaimRequest) Unmarshal Uses

func (m *ProclaimRequest) Unmarshal(dAtA []byte) error

type ProclaimResponse Uses

type ProclaimResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}

func (*ProclaimResponse) Descriptor Uses

func (*ProclaimResponse) Descriptor() ([]byte, []int)

func (*ProclaimResponse) GetHeader Uses

func (m *ProclaimResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*ProclaimResponse) Marshal Uses

func (m *ProclaimResponse) Marshal() (dAtA []byte, err error)

func (*ProclaimResponse) MarshalTo Uses

func (m *ProclaimResponse) MarshalTo(dAtA []byte) (int, error)

func (*ProclaimResponse) ProtoMessage Uses

func (*ProclaimResponse) ProtoMessage()

func (*ProclaimResponse) Reset Uses

func (m *ProclaimResponse) Reset()

func (*ProclaimResponse) Size Uses

func (m *ProclaimResponse) Size() (n int)

func (*ProclaimResponse) String Uses

func (m *ProclaimResponse) String() string

func (*ProclaimResponse) Unmarshal Uses

func (m *ProclaimResponse) Unmarshal(dAtA []byte) error

type ResignRequest Uses

type ResignRequest struct {
    // leader is the leadership to relinquish by resignation.
    Leader *LeaderKey `protobuf:"bytes,1,opt,name=leader" json:"leader,omitempty"`
}

func (*ResignRequest) Descriptor Uses

func (*ResignRequest) Descriptor() ([]byte, []int)

func (*ResignRequest) GetLeader Uses

func (m *ResignRequest) GetLeader() *LeaderKey

func (*ResignRequest) Marshal Uses

func (m *ResignRequest) Marshal() (dAtA []byte, err error)

func (*ResignRequest) MarshalTo Uses

func (m *ResignRequest) MarshalTo(dAtA []byte) (int, error)

func (*ResignRequest) ProtoMessage Uses

func (*ResignRequest) ProtoMessage()

func (*ResignRequest) Reset Uses

func (m *ResignRequest) Reset()

func (*ResignRequest) Size Uses

func (m *ResignRequest) Size() (n int)

func (*ResignRequest) String Uses

func (m *ResignRequest) String() string

func (*ResignRequest) Unmarshal Uses

func (m *ResignRequest) Unmarshal(dAtA []byte) error

type ResignResponse Uses

type ResignResponse struct {
    Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
}

func (*ResignResponse) Descriptor Uses

func (*ResignResponse) Descriptor() ([]byte, []int)

func (*ResignResponse) GetHeader Uses

func (m *ResignResponse) GetHeader() *etcdserverpb.ResponseHeader

func (*ResignResponse) Marshal Uses

func (m *ResignResponse) Marshal() (dAtA []byte, err error)

func (*ResignResponse) MarshalTo Uses

func (m *ResignResponse) MarshalTo(dAtA []byte) (int, error)

func (*ResignResponse) ProtoMessage Uses

func (*ResignResponse) ProtoMessage()

func (*ResignResponse) Reset Uses

func (m *ResignResponse) Reset()

func (*ResignResponse) Size Uses

func (m *ResignResponse) Size() (n int)

func (*ResignResponse) String Uses

func (m *ResignResponse) String() string

func (*ResignResponse) Unmarshal Uses

func (m *ResignResponse) Unmarshal(dAtA []byte) error

Directories

PathSynopsis
gwPackage v3electionpb is a reverse proxy.

Package v3electionpb imports 9 packages (graph) and is imported by 84 packages. Updated 2018-09-11. Refresh now. Tools for package owners.