pb

package
v0.0.0-...-9753c4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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.

View Source
var AckFields = struct {
}{}
View Source
var CommitFields = struct {
	At string
}{
	At: "at",
}
View Source
var DeleteFields = struct {
	Key string
}{
	Key: "key",
}
View Source
var File_internal_replication_gossip_pb_gossip_proto protoreflect.FileDescriptor
View Source
var InitRequestFields = struct {
	Since string
}{
	Since: "since",
}
View Source
var InitResponseFields = struct {
	Last string
	Data string
}{
	Last: "last",
	Data: "data",
}
View Source
var MessageFields = struct {
	Type string
	Name string
	Meta string
}{
	Type: "type",
	Name: "name",
	Meta: "meta",
}
View Source
var MetaFields = struct {
	GRPCPort     string
	LocalVersion string
	IsLeader     string
}{
	GRPCPort:     "grpc_port",
	LocalVersion: "local_version",
	IsLeader:     "is_leader",
}
View Source
var NewFields = struct {
	At string
}{
	At: "at",
}
View Source
var OpFields = struct {
	ID     string
	New    string
	Set    string
	Delete string
	Commit string
}{
	ID:     "id",
	New:    "new",
	Set:    "set",
	Delete: "delete",
	Commit: "commit",
}
View Source
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",
}
View Source
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/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)

View Source
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 (m *Ack) CloneMessageVT() proto.Message

func (*Ack) CloneVT

func (m *Ack) CloneVT() *Ack

func (*Ack) Default

func (x *Ack) Default()

func (*Ack) Descriptor deprecated

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

Deprecated: Use Ack.ProtoReflect.Descriptor instead.

func (*Ack) EqualMessageVT

func (this *Ack) EqualMessageVT(thatMsg proto.Message) bool

func (*Ack) EqualVT

func (this *Ack) EqualVT(that *Ack) bool

func (*Ack) MarshalToSizedBufferVT

func (m *Ack) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Ack) MarshalToVT

func (m *Ack) MarshalToVT(dAtA []byte) (int, error)

func (*Ack) MarshalVT

func (m *Ack) MarshalVT() (dAtA []byte, err error)

func (*Ack) ProtoMessage

func (*Ack) ProtoMessage()

func (*Ack) ProtoReflect

func (x *Ack) ProtoReflect() protoreflect.Message

func (*Ack) Reset

func (x *Ack) Reset()

func (*Ack) SizeVT

func (m *Ack) SizeVT() (n int)

func (*Ack) String

func (x *Ack) String() string

func (*Ack) UnmarshalVT

func (m *Ack) UnmarshalVT(dAtA []byte) error

func (*Ack) Validate

func (m *Ack) Validate() error

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

func (m *Ack) ValidateAll() error

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 (m *Commit) CloneMessageVT() proto.Message

func (*Commit) CloneVT

func (m *Commit) CloneVT() *Commit

func (*Commit) Default

func (x *Commit) Default()

func (*Commit) Descriptor deprecated

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

Deprecated: Use Commit.ProtoReflect.Descriptor instead.

func (*Commit) EqualMessageVT

func (this *Commit) EqualMessageVT(thatMsg proto.Message) bool

func (*Commit) EqualVT

func (this *Commit) EqualVT(that *Commit) bool

func (*Commit) GetAt

func (x *Commit) GetAt() uint64

func (*Commit) MarshalToSizedBufferVT

func (m *Commit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Commit) MarshalToVT

func (m *Commit) MarshalToVT(dAtA []byte) (int, error)

func (*Commit) MarshalVT

func (m *Commit) MarshalVT() (dAtA []byte, err error)

func (*Commit) ProtoMessage

func (*Commit) ProtoMessage()

func (*Commit) ProtoReflect

func (x *Commit) ProtoReflect() protoreflect.Message

func (*Commit) Reset

func (x *Commit) Reset()

func (*Commit) SizeVT

func (m *Commit) SizeVT() (n int)

func (*Commit) String

func (x *Commit) String() string

func (*Commit) UnmarshalVT

func (m *Commit) UnmarshalVT(dAtA []byte) error

func (*Commit) Validate

func (m *Commit) Validate() error

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

func (m *Commit) ValidateAll() error

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 (m *Delete) CloneMessageVT() proto.Message

func (*Delete) CloneVT

func (m *Delete) CloneVT() *Delete

func (*Delete) Default

func (x *Delete) Default()

func (*Delete) Descriptor deprecated

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

Deprecated: Use Delete.ProtoReflect.Descriptor instead.

func (*Delete) EqualMessageVT

func (this *Delete) EqualMessageVT(thatMsg proto.Message) bool

func (*Delete) EqualVT

func (this *Delete) EqualVT(that *Delete) bool

func (*Delete) GetKey

func (x *Delete) GetKey() []byte

func (*Delete) MarshalToSizedBufferVT

func (m *Delete) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Delete) MarshalToVT

func (m *Delete) MarshalToVT(dAtA []byte) (int, error)

func (*Delete) MarshalVT

func (m *Delete) MarshalVT() (dAtA []byte, err error)

func (*Delete) ProtoMessage

func (*Delete) ProtoMessage()

func (*Delete) ProtoReflect

func (x *Delete) ProtoReflect() protoreflect.Message

func (*Delete) Reset

func (x *Delete) Reset()

func (*Delete) SizeVT

func (m *Delete) SizeVT() (n int)

func (*Delete) String

func (x *Delete) String() string

func (*Delete) UnmarshalVT

func (m *Delete) UnmarshalVT(dAtA []byte) error

func (*Delete) Validate

func (m *Delete) Validate() error

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

func (m *Delete) ValidateAll() error

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) Enum

func (x ElectionType) Enum() *ElectionType

func (ElectionType) EnumDescriptor deprecated

func (ElectionType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ElectionType.Descriptor instead.

func (ElectionType) Number

func (ElectionType) String

func (x ElectionType) String() string

func (ElectionType) Type

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

Cause function returns cause value.

func (InitRequestValidationError) Error

Error satisfies the builtin error interface

func (InitRequestValidationError) ErrorName

func (e InitRequestValidationError) ErrorName() string

ErrorName returns error name.

func (InitRequestValidationError) Field

Field function returns field value.

func (InitRequestValidationError) Key

Key function returns key value.

func (InitRequestValidationError) Reason

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

Cause function returns cause value.

func (InitResponseValidationError) Error

Error satisfies the builtin error interface

func (InitResponseValidationError) ErrorName

func (e InitResponseValidationError) ErrorName() string

ErrorName returns error name.

func (InitResponseValidationError) Field

Field function returns field value.

func (InitResponseValidationError) Key

Key function returns key value.

func (InitResponseValidationError) Reason

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 (m *Message) CloneMessageVT() proto.Message

func (*Message) CloneVT

func (m *Message) CloneVT() *Message

func (*Message) Default

func (x *Message) Default()

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) EqualMessageVT

func (this *Message) EqualMessageVT(thatMsg proto.Message) bool

func (*Message) EqualVT

func (this *Message) EqualVT(that *Message) bool

func (*Message) GetMeta

func (x *Message) GetMeta() *Meta

func (*Message) GetName

func (x *Message) GetName() string

func (*Message) GetType

func (x *Message) GetType() ElectionType

func (*Message) MarshalToSizedBufferVT

func (m *Message) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Message) MarshalToVT

func (m *Message) MarshalToVT(dAtA []byte) (int, error)

func (*Message) MarshalVT

func (m *Message) MarshalVT() (dAtA []byte, err error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) SizeVT

func (m *Message) SizeVT() (n int)

func (*Message) String

func (x *Message) String() string

func (*Message) UnmarshalVT

func (m *Message) UnmarshalVT(dAtA []byte) error

func (*Message) Validate

func (m *Message) Validate() error

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

func (m *Message) ValidateAll() error

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 (m *Meta) CloneMessageVT() proto.Message

func (*Meta) CloneVT

func (m *Meta) CloneVT() *Meta

func (*Meta) Default

func (x *Meta) Default()

func (*Meta) Descriptor deprecated

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

Deprecated: Use Meta.ProtoReflect.Descriptor instead.

func (*Meta) EqualMessageVT

func (this *Meta) EqualMessageVT(thatMsg proto.Message) bool

func (*Meta) EqualVT

func (this *Meta) EqualVT(that *Meta) bool

func (*Meta) GetGRPCPort

func (x *Meta) GetGRPCPort() uint32

func (*Meta) GetIsLeader

func (x *Meta) GetIsLeader() bool

func (*Meta) GetLocalVersion

func (x *Meta) GetLocalVersion() uint64

func (*Meta) MarshalToSizedBufferVT

func (m *Meta) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Meta) MarshalToVT

func (m *Meta) MarshalToVT(dAtA []byte) (int, error)

func (*Meta) MarshalVT

func (m *Meta) MarshalVT() (dAtA []byte, err error)

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) ProtoReflect

func (x *Meta) ProtoReflect() protoreflect.Message

func (*Meta) Reset

func (x *Meta) Reset()

func (*Meta) SizeVT

func (m *Meta) SizeVT() (n int)

func (*Meta) String

func (x *Meta) String() string

func (*Meta) UnmarshalVT

func (m *Meta) UnmarshalVT(dAtA []byte) error

func (*Meta) Validate

func (m *Meta) Validate() error

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

func (m *Meta) ValidateAll() error

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 (m *New) CloneMessageVT() proto.Message

func (*New) CloneVT

func (m *New) CloneVT() *New

func (*New) Default

func (x *New) Default()

func (*New) Descriptor deprecated

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

Deprecated: Use New.ProtoReflect.Descriptor instead.

func (*New) EqualMessageVT

func (this *New) EqualMessageVT(thatMsg proto.Message) bool

func (*New) EqualVT

func (this *New) EqualVT(that *New) bool

func (*New) GetAt

func (x *New) GetAt() uint64

func (*New) MarshalToSizedBufferVT

func (m *New) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*New) MarshalToVT

func (m *New) MarshalToVT(dAtA []byte) (int, error)

func (*New) MarshalVT

func (m *New) MarshalVT() (dAtA []byte, err error)

func (*New) ProtoMessage

func (*New) ProtoMessage()

func (*New) ProtoReflect

func (x *New) ProtoReflect() protoreflect.Message

func (*New) Reset

func (x *New) Reset()

func (*New) SizeVT

func (m *New) SizeVT() (n int)

func (*New) String

func (x *New) String() string

func (*New) UnmarshalVT

func (m *New) UnmarshalVT(dAtA []byte) error

func (*New) Validate

func (m *New) Validate() error

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

func (m *New) ValidateAll() error

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 (m *Op) CloneMessageVT() proto.Message

func (*Op) CloneVT

func (m *Op) CloneVT() *Op

func (*Op) Default

func (x *Op) Default()

func (*Op) Descriptor deprecated

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

Deprecated: Use Op.ProtoReflect.Descriptor instead.

func (*Op) EqualMessageVT

func (this *Op) EqualMessageVT(thatMsg proto.Message) bool

func (*Op) EqualVT

func (this *Op) EqualVT(that *Op) bool

func (*Op) GetAction

func (m *Op) GetAction() isOp_Action

func (*Op) GetCommit

func (x *Op) GetCommit() *Commit

func (*Op) GetDelete

func (x *Op) GetDelete() *Delete

func (*Op) GetID

func (x *Op) GetID() uint64

func (*Op) GetNew

func (x *Op) GetNew() *New

func (*Op) GetSet

func (x *Op) GetSet() *Set

func (*Op) MarshalToSizedBufferVT

func (m *Op) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Op) MarshalToVT

func (m *Op) MarshalToVT(dAtA []byte) (int, error)

func (*Op) MarshalVT

func (m *Op) MarshalVT() (dAtA []byte, err error)

func (*Op) ProtoMessage

func (*Op) ProtoMessage()

func (*Op) ProtoReflect

func (x *Op) ProtoReflect() protoreflect.Message

func (*Op) Reset

func (x *Op) Reset()

func (*Op) SizeVT

func (m *Op) SizeVT() (n int)

func (*Op) String

func (x *Op) String() string

func (*Op) UnmarshalVT

func (m *Op) UnmarshalVT(dAtA []byte) error

func (*Op) Validate

func (m *Op) Validate() error

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

func (m *Op) ValidateAll() error

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) CloneVT

func (m *Op_Commit) CloneVT() isOp_Action

func (*Op_Commit) EqualVT

func (this *Op_Commit) EqualVT(thatIface isOp_Action) bool

func (*Op_Commit) MarshalToSizedBufferVT

func (m *Op_Commit) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Op_Commit) MarshalToVT

func (m *Op_Commit) MarshalToVT(dAtA []byte) (int, error)

func (*Op_Commit) SizeVT

func (m *Op_Commit) SizeVT() (n int)

type Op_Delete

type Op_Delete struct {
	Delete *Delete `protobuf:"bytes,4,opt,name=delete,proto3,oneof"`
}

func (*Op_Delete) CloneVT

func (m *Op_Delete) CloneVT() isOp_Action

func (*Op_Delete) EqualVT

func (this *Op_Delete) EqualVT(thatIface isOp_Action) bool

func (*Op_Delete) MarshalToSizedBufferVT

func (m *Op_Delete) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Op_Delete) MarshalToVT

func (m *Op_Delete) MarshalToVT(dAtA []byte) (int, error)

func (*Op_Delete) SizeVT

func (m *Op_Delete) SizeVT() (n int)

type Op_New

type Op_New struct {
	New *New `protobuf:"bytes,2,opt,name=new,proto3,oneof"`
}

func (*Op_New) CloneVT

func (m *Op_New) CloneVT() isOp_Action

func (*Op_New) EqualVT

func (this *Op_New) EqualVT(thatIface isOp_Action) bool

func (*Op_New) MarshalToSizedBufferVT

func (m *Op_New) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Op_New) MarshalToVT

func (m *Op_New) MarshalToVT(dAtA []byte) (int, error)

func (*Op_New) SizeVT

func (m *Op_New) SizeVT() (n int)

type Op_Set

type Op_Set struct {
	Set *Set `protobuf:"bytes,3,opt,name=set,proto3,oneof"`
}

func (*Op_Set) CloneVT

func (m *Op_Set) CloneVT() isOp_Action

func (*Op_Set) EqualVT

func (this *Op_Set) EqualVT(thatIface isOp_Action) bool

func (*Op_Set) MarshalToSizedBufferVT

func (m *Op_Set) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Op_Set) MarshalToVT

func (m *Op_Set) MarshalToVT(dAtA []byte) (int, error)

func (*Op_Set) SizeVT

func (m *Op_Set) SizeVT() (n int)

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.

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

type ReplicationService_AliveClient

type ReplicationService_AliveClient interface {
	Send(*Ack) error
	Recv() (*Ack, error)
	grpc.ClientStream
}

type ReplicationService_AliveServer

type ReplicationService_AliveServer interface {
	Send(*Ack) error
	Recv() (*Ack, error)
	grpc.ServerStream
}

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 ReplicationService_ReplicateClient

type ReplicationService_ReplicateClient interface {
	Send(*Op) error
	Recv() (*Ack, error)
	grpc.ClientStream
}

type ReplicationService_ReplicateServer

type ReplicationService_ReplicateServer interface {
	Send(*Ack) error
	Recv() (*Op, 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 (m *Set) CloneMessageVT() proto.Message

func (*Set) CloneVT

func (m *Set) CloneVT() *Set

func (*Set) Default

func (x *Set) Default()

func (*Set) Descriptor deprecated

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

Deprecated: Use Set.ProtoReflect.Descriptor instead.

func (*Set) EqualMessageVT

func (this *Set) EqualMessageVT(thatMsg proto.Message) bool

func (*Set) EqualVT

func (this *Set) EqualVT(that *Set) bool

func (*Set) GetExpiresAt

func (x *Set) GetExpiresAt() uint64

func (*Set) GetKey

func (x *Set) GetKey() []byte

func (*Set) GetValue

func (x *Set) GetValue() []byte

func (*Set) MarshalToSizedBufferVT

func (m *Set) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*Set) MarshalToVT

func (m *Set) MarshalToVT(dAtA []byte) (int, error)

func (*Set) MarshalVT

func (m *Set) MarshalVT() (dAtA []byte, err error)

func (*Set) ProtoMessage

func (*Set) ProtoMessage()

func (*Set) ProtoReflect

func (x *Set) ProtoReflect() protoreflect.Message

func (*Set) Reset

func (x *Set) Reset()

func (*Set) SizeVT

func (m *Set) SizeVT() (n int)

func (*Set) String

func (x *Set) String() string

func (*Set) UnmarshalVT

func (m *Set) UnmarshalVT(dAtA []byte) error

func (*Set) Validate

func (m *Set) Validate() error

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

func (m *Set) ValidateAll() error

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) Alive

func (UnimplementedReplicationServiceServer) Election

func (UnimplementedReplicationServiceServer) Init

func (UnimplementedReplicationServiceServer) Replicate

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL