Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterReplicationServiceServer(s grpc.ServiceRegistrar, srv ReplicationServiceServer)
- type Ack
- func (m *Ack) CloneMessageVT() proto.Message
- func (m *Ack) CloneVT() *Ack
- func (x *Ack) Default()
- func (*Ack) Descriptor() ([]byte, []int)deprecated
- func (this *Ack) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Ack) EqualVT(that *Ack) bool
- func (m *Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Ack) MarshalToVT(dAtA []byte) (int, error)
- func (m *Ack) MarshalVT() (dAtA []byte, err error)
- func (*Ack) ProtoMessage()
- func (x *Ack) ProtoReflect() protoreflect.Message
- func (x *Ack) Reset()
- func (m *Ack) SizeVT() (n int)
- func (x *Ack) String() string
- func (m *Ack) UnmarshalVT(dAtA []byte) error
- func (m *Ack) Validate() error
- func (m *Ack) ValidateAll() error
- type AckMultiError
- type AckValidationError
- type Commit
- func (m *Commit) CloneMessageVT() proto.Message
- func (m *Commit) CloneVT() *Commit
- func (x *Commit) Default()
- func (*Commit) Descriptor() ([]byte, []int)deprecated
- func (this *Commit) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Commit) EqualVT(that *Commit) bool
- func (x *Commit) GetAt() uint64
- func (m *Commit) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Commit) MarshalToVT(dAtA []byte) (int, error)
- func (m *Commit) MarshalVT() (dAtA []byte, err error)
- func (*Commit) ProtoMessage()
- func (x *Commit) ProtoReflect() protoreflect.Message
- func (x *Commit) Reset()
- func (m *Commit) SizeVT() (n int)
- func (x *Commit) String() string
- func (m *Commit) UnmarshalVT(dAtA []byte) error
- func (m *Commit) Validate() error
- func (m *Commit) ValidateAll() error
- type CommitMultiError
- type CommitValidationError
- type Delete
- func (m *Delete) CloneMessageVT() proto.Message
- func (m *Delete) CloneVT() *Delete
- func (x *Delete) Default()
- func (*Delete) Descriptor() ([]byte, []int)deprecated
- func (this *Delete) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Delete) EqualVT(that *Delete) bool
- func (x *Delete) GetKey() []byte
- func (m *Delete) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Delete) MarshalToVT(dAtA []byte) (int, error)
- func (m *Delete) MarshalVT() (dAtA []byte, err error)
- func (*Delete) ProtoMessage()
- func (x *Delete) ProtoReflect() protoreflect.Message
- func (x *Delete) Reset()
- func (m *Delete) SizeVT() (n int)
- func (x *Delete) String() string
- func (m *Delete) UnmarshalVT(dAtA []byte) error
- func (m *Delete) Validate() error
- func (m *Delete) ValidateAll() error
- type DeleteMultiError
- type DeleteValidationError
- type ElectionType
- func (ElectionType) Descriptor() protoreflect.EnumDescriptor
- func (x ElectionType) Enum() *ElectionType
- func (ElectionType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ElectionType) Number() protoreflect.EnumNumber
- func (x ElectionType) String() string
- func (ElectionType) Type() protoreflect.EnumType
- type InitRequest
- func (m *InitRequest) CloneMessageVT() proto.Message
- func (m *InitRequest) CloneVT() *InitRequest
- func (x *InitRequest) Default()
- func (*InitRequest) Descriptor() ([]byte, []int)deprecated
- func (this *InitRequest) EqualMessageVT(thatMsg proto.Message) bool
- func (this *InitRequest) EqualVT(that *InitRequest) bool
- func (x *InitRequest) GetSince() uint64
- func (m *InitRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *InitRequest) MarshalToVT(dAtA []byte) (int, error)
- func (m *InitRequest) MarshalVT() (dAtA []byte, err error)
- func (*InitRequest) ProtoMessage()
- func (x *InitRequest) ProtoReflect() protoreflect.Message
- func (x *InitRequest) Reset()
- func (m *InitRequest) SizeVT() (n int)
- func (x *InitRequest) String() string
- func (m *InitRequest) UnmarshalVT(dAtA []byte) error
- func (m *InitRequest) Validate() error
- func (m *InitRequest) ValidateAll() error
- type InitRequestMultiError
- type InitRequestValidationError
- func (e InitRequestValidationError) Cause() error
- func (e InitRequestValidationError) Error() string
- func (e InitRequestValidationError) ErrorName() string
- func (e InitRequestValidationError) Field() string
- func (e InitRequestValidationError) Key() bool
- func (e InitRequestValidationError) Reason() string
- type InitResponse
- func (m *InitResponse) CloneMessageVT() proto.Message
- func (m *InitResponse) CloneVT() *InitResponse
- func (x *InitResponse) Default()
- func (*InitResponse) Descriptor() ([]byte, []int)deprecated
- func (this *InitResponse) EqualMessageVT(thatMsg proto.Message) bool
- func (this *InitResponse) EqualVT(that *InitResponse) bool
- func (x *InitResponse) GetData() []byte
- func (x *InitResponse) GetLast() uint64
- func (m *InitResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *InitResponse) MarshalToVT(dAtA []byte) (int, error)
- func (m *InitResponse) MarshalVT() (dAtA []byte, err error)
- func (*InitResponse) ProtoMessage()
- func (x *InitResponse) ProtoReflect() protoreflect.Message
- func (x *InitResponse) Reset()
- func (m *InitResponse) SizeVT() (n int)
- func (x *InitResponse) String() string
- func (m *InitResponse) UnmarshalVT(dAtA []byte) error
- func (m *InitResponse) Validate() error
- func (m *InitResponse) ValidateAll() error
- type InitResponseMultiError
- type InitResponseValidationError
- func (e InitResponseValidationError) Cause() error
- func (e InitResponseValidationError) Error() string
- func (e InitResponseValidationError) ErrorName() string
- func (e InitResponseValidationError) Field() string
- func (e InitResponseValidationError) Key() bool
- func (e InitResponseValidationError) Reason() string
- type Message
- func (m *Message) CloneMessageVT() proto.Message
- func (m *Message) CloneVT() *Message
- func (x *Message) Default()
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (this *Message) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Message) EqualVT(that *Message) bool
- func (x *Message) GetMeta() *Meta
- func (x *Message) GetName() string
- func (x *Message) GetType() ElectionType
- func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Message) MarshalToVT(dAtA []byte) (int, error)
- func (m *Message) MarshalVT() (dAtA []byte, err error)
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (m *Message) SizeVT() (n int)
- func (x *Message) String() string
- func (m *Message) UnmarshalVT(dAtA []byte) error
- func (m *Message) Validate() error
- func (m *Message) ValidateAll() error
- type MessageMultiError
- type MessageValidationError
- type Meta
- func (m *Meta) CloneMessageVT() proto.Message
- func (m *Meta) CloneVT() *Meta
- func (x *Meta) Default()
- func (*Meta) Descriptor() ([]byte, []int)deprecated
- func (this *Meta) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Meta) EqualVT(that *Meta) bool
- func (x *Meta) GetGRPCPort() uint32
- func (x *Meta) GetIsLeader() bool
- func (x *Meta) GetLocalVersion() uint64
- func (m *Meta) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Meta) MarshalToVT(dAtA []byte) (int, error)
- func (m *Meta) MarshalVT() (dAtA []byte, err error)
- func (*Meta) ProtoMessage()
- func (x *Meta) ProtoReflect() protoreflect.Message
- func (x *Meta) Reset()
- func (m *Meta) SizeVT() (n int)
- func (x *Meta) String() string
- func (m *Meta) UnmarshalVT(dAtA []byte) error
- func (m *Meta) Validate() error
- func (m *Meta) ValidateAll() error
- type MetaMultiError
- type MetaValidationError
- type New
- func (m *New) CloneMessageVT() proto.Message
- func (m *New) CloneVT() *New
- func (x *New) Default()
- func (*New) Descriptor() ([]byte, []int)deprecated
- func (this *New) EqualMessageVT(thatMsg proto.Message) bool
- func (this *New) EqualVT(that *New) bool
- func (x *New) GetAt() uint64
- func (m *New) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *New) MarshalToVT(dAtA []byte) (int, error)
- func (m *New) MarshalVT() (dAtA []byte, err error)
- func (*New) ProtoMessage()
- func (x *New) ProtoReflect() protoreflect.Message
- func (x *New) Reset()
- func (m *New) SizeVT() (n int)
- func (x *New) String() string
- func (m *New) UnmarshalVT(dAtA []byte) error
- func (m *New) Validate() error
- func (m *New) ValidateAll() error
- type NewMultiError
- type NewValidationError
- type Op
- func (m *Op) CloneMessageVT() proto.Message
- func (m *Op) CloneVT() *Op
- func (x *Op) Default()
- func (*Op) Descriptor() ([]byte, []int)deprecated
- func (this *Op) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Op) EqualVT(that *Op) bool
- func (m *Op) GetAction() isOp_Action
- func (x *Op) GetCommit() *Commit
- func (x *Op) GetDelete() *Delete
- func (x *Op) GetID() uint64
- func (x *Op) GetNew() *New
- func (x *Op) GetSet() *Set
- func (m *Op) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Op) MarshalToVT(dAtA []byte) (int, error)
- func (m *Op) MarshalVT() (dAtA []byte, err error)
- func (*Op) ProtoMessage()
- func (x *Op) ProtoReflect() protoreflect.Message
- func (x *Op) Reset()
- func (m *Op) SizeVT() (n int)
- func (x *Op) String() string
- func (m *Op) UnmarshalVT(dAtA []byte) error
- func (m *Op) Validate() error
- func (m *Op) ValidateAll() error
- type OpMultiError
- type OpValidationError
- type Op_Commit
- type Op_Delete
- type Op_New
- type Op_Set
- type ReplicationServiceClient
- type ReplicationServiceServer
- type ReplicationService_AliveClient
- type ReplicationService_AliveServer
- type ReplicationService_InitClient
- type ReplicationService_InitServer
- type ReplicationService_ReplicateClient
- type ReplicationService_ReplicateServer
- type Set
- func (m *Set) CloneMessageVT() proto.Message
- func (m *Set) CloneVT() *Set
- func (x *Set) Default()
- func (*Set) Descriptor() ([]byte, []int)deprecated
- func (this *Set) EqualMessageVT(thatMsg proto.Message) bool
- func (this *Set) EqualVT(that *Set) bool
- func (x *Set) GetExpiresAt() uint64
- func (x *Set) GetKey() []byte
- func (x *Set) GetValue() []byte
- func (m *Set) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Set) MarshalToVT(dAtA []byte) (int, error)
- func (m *Set) MarshalVT() (dAtA []byte, err error)
- func (*Set) ProtoMessage()
- func (x *Set) ProtoReflect() protoreflect.Message
- func (x *Set) Reset()
- func (m *Set) SizeVT() (n int)
- func (x *Set) String() string
- func (m *Set) UnmarshalVT(dAtA []byte) error
- func (m *Set) Validate() error
- func (m *Set) ValidateAll() error
- type SetMultiError
- type SetValidationError
- type UnimplementedReplicationServiceServer
- func (UnimplementedReplicationServiceServer) Alive(ReplicationService_AliveServer) error
- func (UnimplementedReplicationServiceServer) Election(context.Context, *Message) (*Message, error)
- func (UnimplementedReplicationServiceServer) Init(*InitRequest, ReplicationService_InitServer) error
- func (UnimplementedReplicationServiceServer) Replicate(ReplicationService_ReplicateServer) error
- type UnsafeReplicationServiceServer
Constants ¶
const ( ReplicationService_Init_FullMethodName = "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Init" ReplicationService_Replicate_FullMethodName = "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Replicate" ReplicationService_Alive_FullMethodName = "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Alive" ReplicationService_Election_FullMethodName = "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Election" )
Variables ¶
var ( ElectionType_name = map[int32]string{ 0: "NONE", 1: "SKIP", 2: "OK", 3: "ELECTION", 4: "LEADER", } ElectionType_value = map[string]int32{ "NONE": 0, "SKIP": 1, "OK": 2, "ELECTION": 3, "LEADER": 4, } )
Enum value maps for ElectionType.
var AckFields = struct {
}{}
var CommitFields = struct { At string }{ At: "at", }
var DeleteFields = struct { Key string }{ Key: "key", }
var File_internal_badgerd_replication_gossip_pb_gossip_proto protoreflect.FileDescriptor
var InitRequestFields = struct { Since string }{ Since: "since", }
var InitResponseFields = struct { Last string Data string }{ Last: "last", Data: "data", }
var MessageFields = struct { Type string Name string Meta string }{ Type: "type", Name: "name", Meta: "meta", }
var MetaFields = struct { GRPCPort string LocalVersion string IsLeader string }{ GRPCPort: "grpc_port", LocalVersion: "local_version", IsLeader: "is_leader", }
var NewFields = struct { At string }{ At: "at", }
var OpFields = struct { ID string New string Set string Delete string Commit string }{ ID: "id", New: "new", Set: "set", Delete: "delete", Commit: "commit", }
var ReplicationServiceMethods = struct { Init string Replicate string Alive string Election string }{ Init: "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Init", Replicate: "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Replicate", Alive: "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Alive", Election: "/linka.cloud.protodb.internal.replication.gossip.ReplicationService/Election", }
var ReplicationService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "linka.cloud.protodb.internal.replication.gossip.ReplicationService", HandlerType: (*ReplicationServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Election", Handler: _ReplicationService_Election_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "Init", Handler: _ReplicationService_Init_Handler, ServerStreams: true, }, { StreamName: "Replicate", Handler: _ReplicationService_Replicate_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "Alive", Handler: _ReplicationService_Alive_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "internal/badgerd/replication/gossip/pb/gossip.proto", }
ReplicationService_ServiceDesc is the grpc.ServiceDesc for ReplicationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SetFields = struct { Key string Value string ExpiresAt string }{ Key: "key", Value: "value", ExpiresAt: "expires_at", }
Functions ¶
func RegisterReplicationServiceServer ¶
func RegisterReplicationServiceServer(s grpc.ServiceRegistrar, srv ReplicationServiceServer)
Types ¶
type Ack ¶
type Ack struct {
// contains filtered or unexported fields
}
func (*Ack) CloneMessageVT ¶
func (*Ack) Descriptor
deprecated
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
func (*Ack) UnmarshalVT ¶
func (*Ack) Validate ¶
Validate checks the field values on Ack with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Ack) ValidateAll ¶
ValidateAll checks the field values on Ack with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in AckMultiError, or nil if none found.
type AckMultiError ¶
type AckMultiError []error
AckMultiError is an error wrapping multiple validation errors returned by Ack.ValidateAll() if the designated constraints aren't met.
func (AckMultiError) AllErrors ¶
func (m AckMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AckMultiError) Error ¶
func (m AckMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AckValidationError ¶
type AckValidationError struct {
// contains filtered or unexported fields
}
AckValidationError is the validation error returned by Ack.Validate if the designated constraints aren't met.
func (AckValidationError) Cause ¶
func (e AckValidationError) Cause() error
Cause function returns cause value.
func (AckValidationError) Error ¶
func (e AckValidationError) Error() string
Error satisfies the builtin error interface
func (AckValidationError) ErrorName ¶
func (e AckValidationError) ErrorName() string
ErrorName returns error name.
func (AckValidationError) Field ¶
func (e AckValidationError) Field() string
Field function returns field value.
func (AckValidationError) Key ¶
func (e AckValidationError) Key() bool
Key function returns key value.
func (AckValidationError) Reason ¶
func (e AckValidationError) Reason() string
Reason function returns reason value.
type Commit ¶
type Commit struct { At uint64 `protobuf:"varint,1,opt,name=at,proto3" json:"at,omitempty"` // contains filtered or unexported fields }
func (*Commit) CloneMessageVT ¶
func (*Commit) Descriptor
deprecated
func (*Commit) MarshalToSizedBufferVT ¶
func (*Commit) ProtoMessage ¶
func (*Commit) ProtoMessage()
func (*Commit) ProtoReflect ¶
func (x *Commit) ProtoReflect() protoreflect.Message
func (*Commit) UnmarshalVT ¶
func (*Commit) Validate ¶
Validate checks the field values on Commit with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Commit) ValidateAll ¶
ValidateAll checks the field values on Commit with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CommitMultiError, or nil if none found.
type CommitMultiError ¶
type CommitMultiError []error
CommitMultiError is an error wrapping multiple validation errors returned by Commit.ValidateAll() if the designated constraints aren't met.
func (CommitMultiError) AllErrors ¶
func (m CommitMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CommitMultiError) Error ¶
func (m CommitMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CommitValidationError ¶
type CommitValidationError struct {
// contains filtered or unexported fields
}
CommitValidationError is the validation error returned by Commit.Validate if the designated constraints aren't met.
func (CommitValidationError) Cause ¶
func (e CommitValidationError) Cause() error
Cause function returns cause value.
func (CommitValidationError) Error ¶
func (e CommitValidationError) Error() string
Error satisfies the builtin error interface
func (CommitValidationError) ErrorName ¶
func (e CommitValidationError) ErrorName() string
ErrorName returns error name.
func (CommitValidationError) Field ¶
func (e CommitValidationError) Field() string
Field function returns field value.
func (CommitValidationError) Key ¶
func (e CommitValidationError) Key() bool
Key function returns key value.
func (CommitValidationError) Reason ¶
func (e CommitValidationError) Reason() string
Reason function returns reason value.
type Delete ¶
type Delete struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*Delete) CloneMessageVT ¶
func (*Delete) Descriptor
deprecated
func (*Delete) MarshalToSizedBufferVT ¶
func (*Delete) ProtoMessage ¶
func (*Delete) ProtoMessage()
func (*Delete) ProtoReflect ¶
func (x *Delete) ProtoReflect() protoreflect.Message
func (*Delete) UnmarshalVT ¶
func (*Delete) Validate ¶
Validate checks the field values on Delete with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Delete) ValidateAll ¶
ValidateAll checks the field values on Delete with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in DeleteMultiError, or nil if none found.
type DeleteMultiError ¶
type DeleteMultiError []error
DeleteMultiError is an error wrapping multiple validation errors returned by Delete.ValidateAll() if the designated constraints aren't met.
func (DeleteMultiError) AllErrors ¶
func (m DeleteMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteMultiError) Error ¶
func (m DeleteMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteValidationError ¶
type DeleteValidationError struct {
// contains filtered or unexported fields
}
DeleteValidationError is the validation error returned by Delete.Validate if the designated constraints aren't met.
func (DeleteValidationError) Cause ¶
func (e DeleteValidationError) Cause() error
Cause function returns cause value.
func (DeleteValidationError) Error ¶
func (e DeleteValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteValidationError) ErrorName ¶
func (e DeleteValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteValidationError) Field ¶
func (e DeleteValidationError) Field() string
Field function returns field value.
func (DeleteValidationError) Key ¶
func (e DeleteValidationError) Key() bool
Key function returns key value.
func (DeleteValidationError) Reason ¶
func (e DeleteValidationError) Reason() string
Reason function returns reason value.
type ElectionType ¶
type ElectionType int32
const ( ElectionTypeNone ElectionType = 0 ElectionTypeSkip ElectionType = 1 ElectionTypeOk ElectionType = 2 ElectionTypeElection ElectionType = 3 ElectionTypeLeader ElectionType = 4 )
func (ElectionType) Descriptor ¶
func (ElectionType) Descriptor() protoreflect.EnumDescriptor
func (ElectionType) Enum ¶
func (x ElectionType) Enum() *ElectionType
func (ElectionType) EnumDescriptor
deprecated
func (ElectionType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ElectionType.Descriptor instead.
func (ElectionType) Number ¶
func (x ElectionType) Number() protoreflect.EnumNumber
func (ElectionType) String ¶
func (x ElectionType) String() string
func (ElectionType) Type ¶
func (ElectionType) Type() protoreflect.EnumType
type InitRequest ¶
type InitRequest struct { Since uint64 `protobuf:"varint,1,opt,name=since,proto3" json:"since,omitempty"` // contains filtered or unexported fields }
func (*InitRequest) CloneMessageVT ¶
func (m *InitRequest) CloneMessageVT() proto.Message
func (*InitRequest) CloneVT ¶
func (m *InitRequest) CloneVT() *InitRequest
func (*InitRequest) Default ¶
func (x *InitRequest) Default()
func (*InitRequest) Descriptor
deprecated
func (*InitRequest) Descriptor() ([]byte, []int)
Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.
func (*InitRequest) EqualMessageVT ¶
func (this *InitRequest) EqualMessageVT(thatMsg proto.Message) bool
func (*InitRequest) EqualVT ¶
func (this *InitRequest) EqualVT(that *InitRequest) bool
func (*InitRequest) GetSince ¶
func (x *InitRequest) GetSince() uint64
func (*InitRequest) MarshalToSizedBufferVT ¶
func (m *InitRequest) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*InitRequest) MarshalToVT ¶
func (m *InitRequest) MarshalToVT(dAtA []byte) (int, error)
func (*InitRequest) MarshalVT ¶
func (m *InitRequest) MarshalVT() (dAtA []byte, err error)
func (*InitRequest) ProtoMessage ¶
func (*InitRequest) ProtoMessage()
func (*InitRequest) ProtoReflect ¶
func (x *InitRequest) ProtoReflect() protoreflect.Message
func (*InitRequest) Reset ¶
func (x *InitRequest) Reset()
func (*InitRequest) SizeVT ¶
func (m *InitRequest) SizeVT() (n int)
func (*InitRequest) String ¶
func (x *InitRequest) String() string
func (*InitRequest) UnmarshalVT ¶
func (m *InitRequest) UnmarshalVT(dAtA []byte) error
func (*InitRequest) Validate ¶
func (m *InitRequest) Validate() error
Validate checks the field values on InitRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*InitRequest) ValidateAll ¶
func (m *InitRequest) ValidateAll() error
ValidateAll checks the field values on InitRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InitRequestMultiError, or nil if none found.
type InitRequestMultiError ¶
type InitRequestMultiError []error
InitRequestMultiError is an error wrapping multiple validation errors returned by InitRequest.ValidateAll() if the designated constraints aren't met.
func (InitRequestMultiError) AllErrors ¶
func (m InitRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InitRequestMultiError) Error ¶
func (m InitRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InitRequestValidationError ¶
type InitRequestValidationError struct {
// contains filtered or unexported fields
}
InitRequestValidationError is the validation error returned by InitRequest.Validate if the designated constraints aren't met.
func (InitRequestValidationError) Cause ¶
func (e InitRequestValidationError) Cause() error
Cause function returns cause value.
func (InitRequestValidationError) Error ¶
func (e InitRequestValidationError) Error() string
Error satisfies the builtin error interface
func (InitRequestValidationError) ErrorName ¶
func (e InitRequestValidationError) ErrorName() string
ErrorName returns error name.
func (InitRequestValidationError) Field ¶
func (e InitRequestValidationError) Field() string
Field function returns field value.
func (InitRequestValidationError) Key ¶
func (e InitRequestValidationError) Key() bool
Key function returns key value.
func (InitRequestValidationError) Reason ¶
func (e InitRequestValidationError) Reason() string
Reason function returns reason value.
type InitResponse ¶
type InitResponse struct { Last uint64 `protobuf:"varint,1,opt,name=last,proto3" json:"last,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*InitResponse) CloneMessageVT ¶
func (m *InitResponse) CloneMessageVT() proto.Message
func (*InitResponse) CloneVT ¶
func (m *InitResponse) CloneVT() *InitResponse
func (*InitResponse) Default ¶
func (x *InitResponse) Default()
func (*InitResponse) Descriptor
deprecated
func (*InitResponse) Descriptor() ([]byte, []int)
Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.
func (*InitResponse) EqualMessageVT ¶
func (this *InitResponse) EqualMessageVT(thatMsg proto.Message) bool
func (*InitResponse) EqualVT ¶
func (this *InitResponse) EqualVT(that *InitResponse) bool
func (*InitResponse) GetData ¶
func (x *InitResponse) GetData() []byte
func (*InitResponse) GetLast ¶
func (x *InitResponse) GetLast() uint64
func (*InitResponse) MarshalToSizedBufferVT ¶
func (m *InitResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*InitResponse) MarshalToVT ¶
func (m *InitResponse) MarshalToVT(dAtA []byte) (int, error)
func (*InitResponse) MarshalVT ¶
func (m *InitResponse) MarshalVT() (dAtA []byte, err error)
func (*InitResponse) ProtoMessage ¶
func (*InitResponse) ProtoMessage()
func (*InitResponse) ProtoReflect ¶
func (x *InitResponse) ProtoReflect() protoreflect.Message
func (*InitResponse) Reset ¶
func (x *InitResponse) Reset()
func (*InitResponse) SizeVT ¶
func (m *InitResponse) SizeVT() (n int)
func (*InitResponse) String ¶
func (x *InitResponse) String() string
func (*InitResponse) UnmarshalVT ¶
func (m *InitResponse) UnmarshalVT(dAtA []byte) error
func (*InitResponse) Validate ¶
func (m *InitResponse) Validate() error
Validate checks the field values on InitResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*InitResponse) ValidateAll ¶
func (m *InitResponse) ValidateAll() error
ValidateAll checks the field values on InitResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in InitResponseMultiError, or nil if none found.
type InitResponseMultiError ¶
type InitResponseMultiError []error
InitResponseMultiError is an error wrapping multiple validation errors returned by InitResponse.ValidateAll() if the designated constraints aren't met.
func (InitResponseMultiError) AllErrors ¶
func (m InitResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InitResponseMultiError) Error ¶
func (m InitResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InitResponseValidationError ¶
type InitResponseValidationError struct {
// contains filtered or unexported fields
}
InitResponseValidationError is the validation error returned by InitResponse.Validate if the designated constraints aren't met.
func (InitResponseValidationError) Cause ¶
func (e InitResponseValidationError) Cause() error
Cause function returns cause value.
func (InitResponseValidationError) Error ¶
func (e InitResponseValidationError) Error() string
Error satisfies the builtin error interface
func (InitResponseValidationError) ErrorName ¶
func (e InitResponseValidationError) ErrorName() string
ErrorName returns error name.
func (InitResponseValidationError) Field ¶
func (e InitResponseValidationError) Field() string
Field function returns field value.
func (InitResponseValidationError) Key ¶
func (e InitResponseValidationError) Key() bool
Key function returns key value.
func (InitResponseValidationError) Reason ¶
func (e InitResponseValidationError) Reason() string
Reason function returns reason value.
type Message ¶
type Message struct { Type ElectionType `` /* 128-byte string literal not displayed */ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Meta *Meta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta,omitempty"` // contains filtered or unexported fields }
func (*Message) CloneMessageVT ¶
func (*Message) Descriptor
deprecated
func (*Message) GetType ¶
func (x *Message) GetType() ElectionType
func (*Message) MarshalToSizedBufferVT ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
func (*Message) UnmarshalVT ¶
func (*Message) Validate ¶
Validate checks the field values on Message with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Message) ValidateAll ¶
ValidateAll checks the field values on Message with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MessageMultiError, or nil if none found.
type MessageMultiError ¶
type MessageMultiError []error
MessageMultiError is an error wrapping multiple validation errors returned by Message.ValidateAll() if the designated constraints aren't met.
func (MessageMultiError) AllErrors ¶
func (m MessageMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MessageMultiError) Error ¶
func (m MessageMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MessageValidationError ¶
type MessageValidationError struct {
// contains filtered or unexported fields
}
MessageValidationError is the validation error returned by Message.Validate if the designated constraints aren't met.
func (MessageValidationError) Cause ¶
func (e MessageValidationError) Cause() error
Cause function returns cause value.
func (MessageValidationError) Error ¶
func (e MessageValidationError) Error() string
Error satisfies the builtin error interface
func (MessageValidationError) ErrorName ¶
func (e MessageValidationError) ErrorName() string
ErrorName returns error name.
func (MessageValidationError) Field ¶
func (e MessageValidationError) Field() string
Field function returns field value.
func (MessageValidationError) Key ¶
func (e MessageValidationError) Key() bool
Key function returns key value.
func (MessageValidationError) Reason ¶
func (e MessageValidationError) Reason() string
Reason function returns reason value.
type Meta ¶
type Meta struct { GRPCPort uint32 `protobuf:"varint,1,opt,name=grpc_port,json=grpcPort,proto3" json:"grpc_port,omitempty"` LocalVersion uint64 `protobuf:"varint,2,opt,name=local_version,json=localVersion,proto3" json:"local_version,omitempty"` IsLeader bool `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"` // contains filtered or unexported fields }
func (*Meta) CloneMessageVT ¶
func (*Meta) Descriptor
deprecated
func (*Meta) GetGRPCPort ¶
func (*Meta) GetIsLeader ¶
func (*Meta) GetLocalVersion ¶
func (*Meta) MarshalToSizedBufferVT ¶
func (*Meta) ProtoMessage ¶
func (*Meta) ProtoMessage()
func (*Meta) ProtoReflect ¶
func (x *Meta) ProtoReflect() protoreflect.Message
func (*Meta) UnmarshalVT ¶
func (*Meta) Validate ¶
Validate checks the field values on Meta with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Meta) ValidateAll ¶
ValidateAll checks the field values on Meta with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in MetaMultiError, or nil if none found.
type MetaMultiError ¶
type MetaMultiError []error
MetaMultiError is an error wrapping multiple validation errors returned by Meta.ValidateAll() if the designated constraints aren't met.
func (MetaMultiError) AllErrors ¶
func (m MetaMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MetaMultiError) Error ¶
func (m MetaMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MetaValidationError ¶
type MetaValidationError struct {
// contains filtered or unexported fields
}
MetaValidationError is the validation error returned by Meta.Validate if the designated constraints aren't met.
func (MetaValidationError) Cause ¶
func (e MetaValidationError) Cause() error
Cause function returns cause value.
func (MetaValidationError) Error ¶
func (e MetaValidationError) Error() string
Error satisfies the builtin error interface
func (MetaValidationError) ErrorName ¶
func (e MetaValidationError) ErrorName() string
ErrorName returns error name.
func (MetaValidationError) Field ¶
func (e MetaValidationError) Field() string
Field function returns field value.
func (MetaValidationError) Key ¶
func (e MetaValidationError) Key() bool
Key function returns key value.
func (MetaValidationError) Reason ¶
func (e MetaValidationError) Reason() string
Reason function returns reason value.
type New ¶
type New struct { At uint64 `protobuf:"varint,1,opt,name=at,proto3" json:"at,omitempty"` // contains filtered or unexported fields }
func (*New) CloneMessageVT ¶
func (*New) Descriptor
deprecated
func (*New) ProtoMessage ¶
func (*New) ProtoMessage()
func (*New) ProtoReflect ¶
func (x *New) ProtoReflect() protoreflect.Message
func (*New) UnmarshalVT ¶
func (*New) Validate ¶
Validate checks the field values on New with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*New) ValidateAll ¶
ValidateAll checks the field values on New with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in NewMultiError, or nil if none found.
type NewMultiError ¶
type NewMultiError []error
NewMultiError is an error wrapping multiple validation errors returned by New.ValidateAll() if the designated constraints aren't met.
func (NewMultiError) AllErrors ¶
func (m NewMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (NewMultiError) Error ¶
func (m NewMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type NewValidationError ¶
type NewValidationError struct {
// contains filtered or unexported fields
}
NewValidationError is the validation error returned by New.Validate if the designated constraints aren't met.
func (NewValidationError) Cause ¶
func (e NewValidationError) Cause() error
Cause function returns cause value.
func (NewValidationError) Error ¶
func (e NewValidationError) Error() string
Error satisfies the builtin error interface
func (NewValidationError) ErrorName ¶
func (e NewValidationError) ErrorName() string
ErrorName returns error name.
func (NewValidationError) Field ¶
func (e NewValidationError) Field() string
Field function returns field value.
func (NewValidationError) Key ¶
func (e NewValidationError) Key() bool
Key function returns key value.
func (NewValidationError) Reason ¶
func (e NewValidationError) Reason() string
Reason function returns reason value.
type Op ¶
type Op struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Action: // // *Op_New // *Op_Set // *Op_Delete // *Op_Commit Action isOp_Action `protobuf_oneof:"action"` // contains filtered or unexported fields }
func (*Op) CloneMessageVT ¶
func (*Op) Descriptor
deprecated
func (*Op) ProtoMessage ¶
func (*Op) ProtoMessage()
func (*Op) ProtoReflect ¶
func (x *Op) ProtoReflect() protoreflect.Message
func (*Op) UnmarshalVT ¶
func (*Op) Validate ¶
Validate checks the field values on Op with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Op) ValidateAll ¶
ValidateAll checks the field values on Op with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OpMultiError, or nil if none found.
type OpMultiError ¶
type OpMultiError []error
OpMultiError is an error wrapping multiple validation errors returned by Op.ValidateAll() if the designated constraints aren't met.
func (OpMultiError) AllErrors ¶
func (m OpMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (OpMultiError) Error ¶
func (m OpMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type OpValidationError ¶
type OpValidationError struct {
// contains filtered or unexported fields
}
OpValidationError is the validation error returned by Op.Validate if the designated constraints aren't met.
func (OpValidationError) Cause ¶
func (e OpValidationError) Cause() error
Cause function returns cause value.
func (OpValidationError) Error ¶
func (e OpValidationError) Error() string
Error satisfies the builtin error interface
func (OpValidationError) ErrorName ¶
func (e OpValidationError) ErrorName() string
ErrorName returns error name.
func (OpValidationError) Field ¶
func (e OpValidationError) Field() string
Field function returns field value.
func (OpValidationError) Key ¶
func (e OpValidationError) Key() bool
Key function returns key value.
func (OpValidationError) Reason ¶
func (e OpValidationError) Reason() string
Reason function returns reason value.
type Op_Commit ¶
type Op_Commit struct {
Commit *Commit `protobuf:"bytes,5,opt,name=commit,proto3,oneof"`
}
func (*Op_Commit) MarshalToSizedBufferVT ¶
type Op_Delete ¶
type Op_Delete struct {
Delete *Delete `protobuf:"bytes,4,opt,name=delete,proto3,oneof"`
}
func (*Op_Delete) MarshalToSizedBufferVT ¶
type Op_New ¶
type Op_New struct {
New *New `protobuf:"bytes,2,opt,name=new,proto3,oneof"`
}
func (*Op_New) MarshalToSizedBufferVT ¶
type Op_Set ¶
type Op_Set struct {
Set *Set `protobuf:"bytes,3,opt,name=set,proto3,oneof"`
}
func (*Op_Set) MarshalToSizedBufferVT ¶
type ReplicationServiceClient ¶
type ReplicationServiceClient interface { Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (ReplicationService_InitClient, error) Replicate(ctx context.Context, opts ...grpc.CallOption) (ReplicationService_ReplicateClient, error) Alive(ctx context.Context, opts ...grpc.CallOption) (ReplicationService_AliveClient, error) Election(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) }
ReplicationServiceClient is the client API for ReplicationService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewReplicationServiceClient ¶
func NewReplicationServiceClient(cc grpc.ClientConnInterface) ReplicationServiceClient
type ReplicationServiceServer ¶
type ReplicationServiceServer interface { Init(*InitRequest, ReplicationService_InitServer) error Replicate(ReplicationService_ReplicateServer) error Alive(ReplicationService_AliveServer) error Election(context.Context, *Message) (*Message, error) // contains filtered or unexported methods }
ReplicationServiceServer is the server API for ReplicationService service. All implementations must embed UnimplementedReplicationServiceServer for forward compatibility
func NewReplicationServiceProxy ¶
func NewReplicationServiceProxy(c ReplicationServiceClient, opts ...grpc.CallOption) ReplicationServiceServer
type ReplicationService_InitClient ¶
type ReplicationService_InitClient interface { Recv() (*InitResponse, error) grpc.ClientStream }
type ReplicationService_InitServer ¶
type ReplicationService_InitServer interface { Send(*InitResponse) error grpc.ServerStream }
type Set ¶
type Set struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` ExpiresAt uint64 `protobuf:"varint,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // contains filtered or unexported fields }
func (*Set) CloneMessageVT ¶
func (*Set) Descriptor
deprecated
func (*Set) GetExpiresAt ¶
func (*Set) ProtoMessage ¶
func (*Set) ProtoMessage()
func (*Set) ProtoReflect ¶
func (x *Set) ProtoReflect() protoreflect.Message
func (*Set) UnmarshalVT ¶
func (*Set) Validate ¶
Validate checks the field values on Set with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Set) ValidateAll ¶
ValidateAll checks the field values on Set with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SetMultiError, or nil if none found.
type SetMultiError ¶
type SetMultiError []error
SetMultiError is an error wrapping multiple validation errors returned by Set.ValidateAll() if the designated constraints aren't met.
func (SetMultiError) AllErrors ¶
func (m SetMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SetMultiError) Error ¶
func (m SetMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SetValidationError ¶
type SetValidationError struct {
// contains filtered or unexported fields
}
SetValidationError is the validation error returned by Set.Validate if the designated constraints aren't met.
func (SetValidationError) Cause ¶
func (e SetValidationError) Cause() error
Cause function returns cause value.
func (SetValidationError) Error ¶
func (e SetValidationError) Error() string
Error satisfies the builtin error interface
func (SetValidationError) ErrorName ¶
func (e SetValidationError) ErrorName() string
ErrorName returns error name.
func (SetValidationError) Field ¶
func (e SetValidationError) Field() string
Field function returns field value.
func (SetValidationError) Key ¶
func (e SetValidationError) Key() bool
Key function returns key value.
func (SetValidationError) Reason ¶
func (e SetValidationError) Reason() string
Reason function returns reason value.
type UnimplementedReplicationServiceServer ¶
type UnimplementedReplicationServiceServer struct { }
UnimplementedReplicationServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedReplicationServiceServer) Replicate ¶
func (UnimplementedReplicationServiceServer) Replicate(ReplicationService_ReplicateServer) error
type UnsafeReplicationServiceServer ¶
type UnsafeReplicationServiceServer interface {
// contains filtered or unexported methods
}
UnsafeReplicationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ReplicationServiceServer will result in compilation errors.