api

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 25 Imported by: 0

README

api (cassemdb)

cassemdb component's client SDK.

Documentation

Index

Constants

View Source
const (
	NEVER_EXPIRED = -2
	EXPIRED       = -1
)

Variables

View Source
var Change_Op_name = map[int32]string{
	0: "Invalid",
	1: "Set",
	2: "Unset",
}
View Source
var Change_Op_value = map[string]int32{
	"Invalid": 0,
	"Set":     1,
	"Unset":   2,
}
View Source
var EntityType_name = map[int32]string{
	0: "UNKNOWN",
	1: "ELT",
	2: "DIR",
}
View Source
var EntityType_value = map[string]int32{
	"UNKNOWN": 0,
	"ELT":     1,
	"DIR":     2,
}
View Source
var LogEntry_Action_name = map[int32]string{
	0: "UNKNOWN",
	1: "Set",
	2: "ChangeSpread",
}
View Source
var LogEntry_Action_value = map[string]int32{
	"UNKNOWN":      0,
	"Set":          1,
	"ChangeSpread": 2,
}

Functions

func DialWithMode

func DialWithMode(endpoints []string, mode Mode) (*grpc.ClientConn, error)

DialWithMode support multiple backend server and load balance while request backend servers in round-robin.

target = "cassemdb:///0.0.0.0:2021,1.1.1.1:2021" can only communicate to leader, target = "cassemdb:/all//0.0.0.0:2021,1.1.1.1:2021" can communicate to other nodes, but note that the client can only execute READ operations.

func Marshal

func Marshal(m proto.Message) ([]byte, error)

func Must

func Must(d []byte, err error) []byte

func MustUnmarshal

func MustUnmarshal(data []byte, m proto.Message)

func RegisterKVServer

func RegisterKVServer(s *grpc.Server, srv KVServer)

func Unmarshal

func Unmarshal(data []byte, m proto.Message) error

func WithLock

func WithLock(kv KVClient, lockKey string, ttl int, f func())

Types

type Change

type Change struct {
	Op                   Change_Op `protobuf:"varint,1,opt,name=op,proto3,enum=cassem.db.Change_Op" json:"op,omitempty"`
	Key                  string    `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Last                 *Entity   `protobuf:"bytes,3,opt,name=last,proto3" json:"last,omitempty"`
	Current              *Entity   `protobuf:"bytes,4,opt,name=current,proto3" json:"current,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*Change) Descriptor

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

func (*Change) GetCurrent

func (m *Change) GetCurrent() *Entity

func (*Change) GetKey

func (m *Change) GetKey() string

func (*Change) GetLast

func (m *Change) GetLast() *Entity

func (*Change) GetOp

func (m *Change) GetOp() Change_Op

func (*Change) ProtoMessage

func (*Change) ProtoMessage()

func (*Change) Reset

func (m *Change) Reset()

func (*Change) String

func (m *Change) String() string

func (*Change) Topic

func (m *Change) Topic() string

func (*Change) Type

func (*Change) Type() watcher.ChangeType

func (*Change) Validate

func (m *Change) Validate() error

Validate checks the field values on Change with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Change) XXX_DiscardUnknown

func (m *Change) XXX_DiscardUnknown()

func (*Change) XXX_Marshal

func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Change) XXX_Merge

func (m *Change) XXX_Merge(src proto.Message)

func (*Change) XXX_Size

func (m *Change) XXX_Size() int

func (*Change) XXX_Unmarshal

func (m *Change) XXX_Unmarshal(b []byte) error

type ChangeCommand

type ChangeCommand struct {
	Change               *Change  `protobuf:"bytes,1,opt,name=change,proto3" json:"change,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ChangeCommand) Action

func (*ChangeCommand) Action() LogEntry_Action

func (*ChangeCommand) Descriptor

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

func (*ChangeCommand) GetChange

func (m *ChangeCommand) GetChange() *Change

func (*ChangeCommand) ProtoMessage

func (*ChangeCommand) ProtoMessage()

func (*ChangeCommand) Reset

func (m *ChangeCommand) Reset()

func (*ChangeCommand) String

func (m *ChangeCommand) String() string

func (*ChangeCommand) Validate

func (m *ChangeCommand) Validate() error

Validate checks the field values on ChangeCommand with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ChangeCommand) XXX_DiscardUnknown

func (m *ChangeCommand) XXX_DiscardUnknown()

func (*ChangeCommand) XXX_Marshal

func (m *ChangeCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ChangeCommand) XXX_Merge

func (m *ChangeCommand) XXX_Merge(src proto.Message)

func (*ChangeCommand) XXX_Size

func (m *ChangeCommand) XXX_Size() int

func (*ChangeCommand) XXX_Unmarshal

func (m *ChangeCommand) XXX_Unmarshal(b []byte) error

type ChangeCommandValidationError

type ChangeCommandValidationError struct {
	// contains filtered or unexported fields
}

ChangeCommandValidationError is the validation error returned by ChangeCommand.Validate if the designated constraints aren't met.

func (ChangeCommandValidationError) Cause

Cause function returns cause value.

func (ChangeCommandValidationError) Error

Error satisfies the builtin error interface

func (ChangeCommandValidationError) ErrorName

func (e ChangeCommandValidationError) ErrorName() string

ErrorName returns error name.

func (ChangeCommandValidationError) Field

Field function returns field value.

func (ChangeCommandValidationError) Key

Key function returns key value.

func (ChangeCommandValidationError) Reason

Reason function returns reason value.

type ChangeValidationError

type ChangeValidationError struct {
	// contains filtered or unexported fields
}

ChangeValidationError is the validation error returned by Change.Validate if the designated constraints aren't met.

func (ChangeValidationError) Cause

func (e ChangeValidationError) Cause() error

Cause function returns cause value.

func (ChangeValidationError) Error

func (e ChangeValidationError) Error() string

Error satisfies the builtin error interface

func (ChangeValidationError) ErrorName

func (e ChangeValidationError) ErrorName() string

ErrorName returns error name.

func (ChangeValidationError) Field

func (e ChangeValidationError) Field() string

Field function returns field value.

func (ChangeValidationError) Key

func (e ChangeValidationError) Key() bool

Key function returns key value.

func (ChangeValidationError) Reason

func (e ChangeValidationError) Reason() string

Reason function returns reason value.

type Change_Op

type Change_Op int32
const (
	Change_Invalid Change_Op = 0
	Change_Set     Change_Op = 1
	Change_Unset   Change_Op = 2
)

func (Change_Op) EnumDescriptor

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

func (Change_Op) String

func (x Change_Op) String() string

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) Validate

func (m *Empty) Validate() error

Validate checks the field values on Empty with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type EmptyValidationError

type EmptyValidationError struct {
	// contains filtered or unexported fields
}

EmptyValidationError is the validation error returned by Empty.Validate if the designated constraints aren't met.

func (EmptyValidationError) Cause

func (e EmptyValidationError) Cause() error

Cause function returns cause value.

func (EmptyValidationError) Error

func (e EmptyValidationError) Error() string

Error satisfies the builtin error interface

func (EmptyValidationError) ErrorName

func (e EmptyValidationError) ErrorName() string

ErrorName returns error name.

func (EmptyValidationError) Field

func (e EmptyValidationError) Field() string

Field function returns field value.

func (EmptyValidationError) Key

func (e EmptyValidationError) Key() bool

Key function returns key value.

func (EmptyValidationError) Reason

func (e EmptyValidationError) Reason() string

Reason function returns reason value.

type Entity

type Entity struct {
	Fingerprint          string     `protobuf:"bytes,1,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	Key                  string     `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	Val                  []byte     `protobuf:"bytes,3,opt,name=val,proto3" json:"val,omitempty"`
	CreatedAt            int64      `protobuf:"varint,4,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	UpdatedAt            int64      `protobuf:"varint,5,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
	Ttl                  int32      `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Typ                  EntityType `protobuf:"varint,7,opt,name=typ,proto3,enum=cassem.db.EntityType" json:"typ,omitempty"`
	Size                 int32      `protobuf:"varint,8,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func NewEntityWithCreated

func NewEntityWithCreated(key string, val []byte, ttl int32, created int64) *Entity

func (*Entity) Descriptor

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

func (*Entity) Expired

func (m *Entity) Expired() bool

func (*Entity) GetCreatedAt

func (m *Entity) GetCreatedAt() int64

func (*Entity) GetFingerprint

func (m *Entity) GetFingerprint() string

func (*Entity) GetKey

func (m *Entity) GetKey() string

func (*Entity) GetSize

func (m *Entity) GetSize() int32

func (*Entity) GetTtl

func (m *Entity) GetTtl() int32

func (*Entity) GetTyp

func (m *Entity) GetTyp() EntityType

func (*Entity) GetUpdatedAt

func (m *Entity) GetUpdatedAt() int64

func (*Entity) GetVal

func (m *Entity) GetVal() []byte

func (*Entity) ProtoMessage

func (*Entity) ProtoMessage()

func (*Entity) Reset

func (m *Entity) Reset()

func (*Entity) String

func (m *Entity) String() string

func (Entity) Type

func (m Entity) Type() EntityType

func (*Entity) Validate

func (m *Entity) Validate() error

Validate checks the field values on Entity with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*Entity) XXX_DiscardUnknown

func (m *Entity) XXX_DiscardUnknown()

func (*Entity) XXX_Marshal

func (m *Entity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Entity) XXX_Merge

func (m *Entity) XXX_Merge(src proto.Message)

func (*Entity) XXX_Size

func (m *Entity) XXX_Size() int

func (*Entity) XXX_Unmarshal

func (m *Entity) XXX_Unmarshal(b []byte) error

type EntityType

type EntityType int32
const (
	EntityType_UNKNOWN EntityType = 0
	EntityType_ELT     EntityType = 1
	EntityType_DIR     EntityType = 2
)

func (EntityType) EnumDescriptor

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

func (EntityType) String

func (x EntityType) String() string

type EntityValidationError

type EntityValidationError struct {
	// contains filtered or unexported fields
}

EntityValidationError is the validation error returned by Entity.Validate if the designated constraints aren't met.

func (EntityValidationError) Cause

func (e EntityValidationError) Cause() error

Cause function returns cause value.

func (EntityValidationError) Error

func (e EntityValidationError) Error() string

Error satisfies the builtin error interface

func (EntityValidationError) ErrorName

func (e EntityValidationError) ErrorName() string

ErrorName returns error name.

func (EntityValidationError) Field

func (e EntityValidationError) Field() string

Field function returns field value.

func (EntityValidationError) Key

func (e EntityValidationError) Key() bool

Key function returns key value.

func (EntityValidationError) Reason

func (e EntityValidationError) Reason() string

Reason function returns reason value.

type ExpireReq

type ExpireReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ExpireReq) Descriptor

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

func (*ExpireReq) GetKey

func (m *ExpireReq) GetKey() string

func (*ExpireReq) ProtoMessage

func (*ExpireReq) ProtoMessage()

func (*ExpireReq) Reset

func (m *ExpireReq) Reset()

func (*ExpireReq) String

func (m *ExpireReq) String() string

func (*ExpireReq) Validate

func (m *ExpireReq) Validate() error

Validate checks the field values on ExpireReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ExpireReq) XXX_DiscardUnknown

func (m *ExpireReq) XXX_DiscardUnknown()

func (*ExpireReq) XXX_Marshal

func (m *ExpireReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ExpireReq) XXX_Merge

func (m *ExpireReq) XXX_Merge(src proto.Message)

func (*ExpireReq) XXX_Size

func (m *ExpireReq) XXX_Size() int

func (*ExpireReq) XXX_Unmarshal

func (m *ExpireReq) XXX_Unmarshal(b []byte) error

type ExpireReqValidationError

type ExpireReqValidationError struct {
	// contains filtered or unexported fields
}

ExpireReqValidationError is the validation error returned by ExpireReq.Validate if the designated constraints aren't met.

func (ExpireReqValidationError) Cause

func (e ExpireReqValidationError) Cause() error

Cause function returns cause value.

func (ExpireReqValidationError) Error

func (e ExpireReqValidationError) Error() string

Error satisfies the builtin error interface

func (ExpireReqValidationError) ErrorName

func (e ExpireReqValidationError) ErrorName() string

ErrorName returns error name.

func (ExpireReqValidationError) Field

func (e ExpireReqValidationError) Field() string

Field function returns field value.

func (ExpireReqValidationError) Key

Key function returns key value.

func (ExpireReqValidationError) Reason

func (e ExpireReqValidationError) Reason() string

Reason function returns reason value.

type GetKVReq

type GetKVReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetKVReq) Descriptor

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

func (*GetKVReq) GetKey

func (m *GetKVReq) GetKey() string

func (*GetKVReq) ProtoMessage

func (*GetKVReq) ProtoMessage()

func (*GetKVReq) Reset

func (m *GetKVReq) Reset()

func (*GetKVReq) String

func (m *GetKVReq) String() string

func (*GetKVReq) Validate

func (m *GetKVReq) Validate() error

Validate checks the field values on GetKVReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetKVReq) XXX_DiscardUnknown

func (m *GetKVReq) XXX_DiscardUnknown()

func (*GetKVReq) XXX_Marshal

func (m *GetKVReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetKVReq) XXX_Merge

func (m *GetKVReq) XXX_Merge(src proto.Message)

func (*GetKVReq) XXX_Size

func (m *GetKVReq) XXX_Size() int

func (*GetKVReq) XXX_Unmarshal

func (m *GetKVReq) XXX_Unmarshal(b []byte) error

type GetKVReqValidationError

type GetKVReqValidationError struct {
	// contains filtered or unexported fields
}

GetKVReqValidationError is the validation error returned by GetKVReq.Validate if the designated constraints aren't met.

func (GetKVReqValidationError) Cause

func (e GetKVReqValidationError) Cause() error

Cause function returns cause value.

func (GetKVReqValidationError) Error

func (e GetKVReqValidationError) Error() string

Error satisfies the builtin error interface

func (GetKVReqValidationError) ErrorName

func (e GetKVReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetKVReqValidationError) Field

func (e GetKVReqValidationError) Field() string

Field function returns field value.

func (GetKVReqValidationError) Key

func (e GetKVReqValidationError) Key() bool

Key function returns key value.

func (GetKVReqValidationError) Reason

func (e GetKVReqValidationError) Reason() string

Reason function returns reason value.

type GetKVResp

type GetKVResp struct {
	Entity               *Entity  `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetKVResp) Descriptor

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

func (*GetKVResp) GetEntity

func (m *GetKVResp) GetEntity() *Entity

func (*GetKVResp) ProtoMessage

func (*GetKVResp) ProtoMessage()

func (*GetKVResp) Reset

func (m *GetKVResp) Reset()

func (*GetKVResp) String

func (m *GetKVResp) String() string

func (*GetKVResp) Validate

func (m *GetKVResp) Validate() error

Validate checks the field values on GetKVResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetKVResp) XXX_DiscardUnknown

func (m *GetKVResp) XXX_DiscardUnknown()

func (*GetKVResp) XXX_Marshal

func (m *GetKVResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetKVResp) XXX_Merge

func (m *GetKVResp) XXX_Merge(src proto.Message)

func (*GetKVResp) XXX_Size

func (m *GetKVResp) XXX_Size() int

func (*GetKVResp) XXX_Unmarshal

func (m *GetKVResp) XXX_Unmarshal(b []byte) error

type GetKVRespValidationError

type GetKVRespValidationError struct {
	// contains filtered or unexported fields
}

GetKVRespValidationError is the validation error returned by GetKVResp.Validate if the designated constraints aren't met.

func (GetKVRespValidationError) Cause

func (e GetKVRespValidationError) Cause() error

Cause function returns cause value.

func (GetKVRespValidationError) Error

func (e GetKVRespValidationError) Error() string

Error satisfies the builtin error interface

func (GetKVRespValidationError) ErrorName

func (e GetKVRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetKVRespValidationError) Field

func (e GetKVRespValidationError) Field() string

Field function returns field value.

func (GetKVRespValidationError) Key

Key function returns key value.

func (GetKVRespValidationError) Reason

func (e GetKVRespValidationError) Reason() string

Reason function returns reason value.

type GetKVsReq

type GetKVsReq struct {
	Keys                 []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetKVsReq) Descriptor

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

func (*GetKVsReq) GetKeys

func (m *GetKVsReq) GetKeys() []string

func (*GetKVsReq) ProtoMessage

func (*GetKVsReq) ProtoMessage()

func (*GetKVsReq) Reset

func (m *GetKVsReq) Reset()

func (*GetKVsReq) String

func (m *GetKVsReq) String() string

func (*GetKVsReq) Validate

func (m *GetKVsReq) Validate() error

Validate checks the field values on GetKVsReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetKVsReq) XXX_DiscardUnknown

func (m *GetKVsReq) XXX_DiscardUnknown()

func (*GetKVsReq) XXX_Marshal

func (m *GetKVsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetKVsReq) XXX_Merge

func (m *GetKVsReq) XXX_Merge(src proto.Message)

func (*GetKVsReq) XXX_Size

func (m *GetKVsReq) XXX_Size() int

func (*GetKVsReq) XXX_Unmarshal

func (m *GetKVsReq) XXX_Unmarshal(b []byte) error

type GetKVsReqValidationError

type GetKVsReqValidationError struct {
	// contains filtered or unexported fields
}

GetKVsReqValidationError is the validation error returned by GetKVsReq.Validate if the designated constraints aren't met.

func (GetKVsReqValidationError) Cause

func (e GetKVsReqValidationError) Cause() error

Cause function returns cause value.

func (GetKVsReqValidationError) Error

func (e GetKVsReqValidationError) Error() string

Error satisfies the builtin error interface

func (GetKVsReqValidationError) ErrorName

func (e GetKVsReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetKVsReqValidationError) Field

func (e GetKVsReqValidationError) Field() string

Field function returns field value.

func (GetKVsReqValidationError) Key

Key function returns key value.

func (GetKVsReqValidationError) Reason

func (e GetKVsReqValidationError) Reason() string

Reason function returns reason value.

type GetKVsResp

type GetKVsResp struct {
	Entities             []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*GetKVsResp) Descriptor

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

func (*GetKVsResp) GetEntities

func (m *GetKVsResp) GetEntities() []*Entity

func (*GetKVsResp) ProtoMessage

func (*GetKVsResp) ProtoMessage()

func (*GetKVsResp) Reset

func (m *GetKVsResp) Reset()

func (*GetKVsResp) String

func (m *GetKVsResp) String() string

func (*GetKVsResp) Validate

func (m *GetKVsResp) Validate() error

Validate checks the field values on GetKVsResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*GetKVsResp) XXX_DiscardUnknown

func (m *GetKVsResp) XXX_DiscardUnknown()

func (*GetKVsResp) XXX_Marshal

func (m *GetKVsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetKVsResp) XXX_Merge

func (m *GetKVsResp) XXX_Merge(src proto.Message)

func (*GetKVsResp) XXX_Size

func (m *GetKVsResp) XXX_Size() int

func (*GetKVsResp) XXX_Unmarshal

func (m *GetKVsResp) XXX_Unmarshal(b []byte) error

type GetKVsRespValidationError

type GetKVsRespValidationError struct {
	// contains filtered or unexported fields
}

GetKVsRespValidationError is the validation error returned by GetKVsResp.Validate if the designated constraints aren't met.

func (GetKVsRespValidationError) Cause

func (e GetKVsRespValidationError) Cause() error

Cause function returns cause value.

func (GetKVsRespValidationError) Error

Error satisfies the builtin error interface

func (GetKVsRespValidationError) ErrorName

func (e GetKVsRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetKVsRespValidationError) Field

Field function returns field value.

func (GetKVsRespValidationError) Key

Key function returns key value.

func (GetKVsRespValidationError) Reason

func (e GetKVsRespValidationError) Reason() string

Reason function returns reason value.

type KVClient

type KVClient interface {
	GetKV(ctx context.Context, in *GetKVReq, opts ...grpc.CallOption) (*GetKVResp, error)
	GetKVs(ctx context.Context, in *GetKVsReq, opts ...grpc.CallOption) (*GetKVsResp, error)
	SetKV(ctx context.Context, in *SetKVReq, opts ...grpc.CallOption) (*Empty, error)
	UnsetKV(ctx context.Context, in *UnsetKVReq, opts ...grpc.CallOption) (*Empty, error)
	// Watch will rev a stream response in client.
	Watch(ctx context.Context, in *WatchReq, opts ...grpc.CallOption) (KV_WatchClient, error)
	TTL(ctx context.Context, in *TtlReq, opts ...grpc.CallOption) (*TtlResp, error)
	Expire(ctx context.Context, in *ExpireReq, opts ...grpc.CallOption) (*Empty, error)
	Range(ctx context.Context, in *RangeReq, opts ...grpc.CallOption) (*RangeResp, error)
}

KVClient is the client API for KV service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKVClient

func NewKVClient(cc *grpc.ClientConn) KVClient

type KVServer

type KVServer interface {
	GetKV(context.Context, *GetKVReq) (*GetKVResp, error)
	GetKVs(context.Context, *GetKVsReq) (*GetKVsResp, error)
	SetKV(context.Context, *SetKVReq) (*Empty, error)
	UnsetKV(context.Context, *UnsetKVReq) (*Empty, error)
	// Watch will rev a stream response in client.
	Watch(*WatchReq, KV_WatchServer) error
	TTL(context.Context, *TtlReq) (*TtlResp, error)
	Expire(context.Context, *ExpireReq) (*Empty, error)
	Range(context.Context, *RangeReq) (*RangeResp, error)
}

KVServer is the server API for KV service.

type KV_WatchClient

type KV_WatchClient interface {
	Recv() (*Change, error)
	grpc.ClientStream
}

type KV_WatchServer

type KV_WatchServer interface {
	Send(*Change) error
	grpc.ServerStream
}

type LogEntry

type LogEntry struct {
	// action indicates what's the format of data dose the log entry contains.
	Action               LogEntry_Action `protobuf:"varint,1,opt,name=action,proto3,enum=cassem.db.LogEntry_Action" json:"action,omitempty"`
	Command              []byte          `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	CreatedAt            int64           `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*LogEntry) Descriptor

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

func (*LogEntry) Expired

func (m *LogEntry) Expired() bool

Expired represents the LogEntry has expired, could not be applied by raft node. this method should only be used in some case which cares about duplicate log entries applied.

func (*LogEntry) GetAction

func (m *LogEntry) GetAction() LogEntry_Action

func (*LogEntry) GetCommand

func (m *LogEntry) GetCommand() []byte

func (*LogEntry) GetCreatedAt

func (m *LogEntry) GetCreatedAt() int64

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) Validate

func (m *LogEntry) Validate() error

Validate checks the field values on LogEntry with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*LogEntry) XXX_DiscardUnknown

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal

func (m *LogEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogEntry) XXX_Merge

func (m *LogEntry) XXX_Merge(src proto.Message)

func (*LogEntry) XXX_Size

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal

func (m *LogEntry) XXX_Unmarshal(b []byte) error

type LogEntryValidationError

type LogEntryValidationError struct {
	// contains filtered or unexported fields
}

LogEntryValidationError is the validation error returned by LogEntry.Validate if the designated constraints aren't met.

func (LogEntryValidationError) Cause

func (e LogEntryValidationError) Cause() error

Cause function returns cause value.

func (LogEntryValidationError) Error

func (e LogEntryValidationError) Error() string

Error satisfies the builtin error interface

func (LogEntryValidationError) ErrorName

func (e LogEntryValidationError) ErrorName() string

ErrorName returns error name.

func (LogEntryValidationError) Field

func (e LogEntryValidationError) Field() string

Field function returns field value.

func (LogEntryValidationError) Key

func (e LogEntryValidationError) Key() bool

Key function returns key value.

func (LogEntryValidationError) Reason

func (e LogEntryValidationError) Reason() string

Reason function returns reason value.

type LogEntry_Action

type LogEntry_Action int32
const (
	LogEntry_UNKNOWN      LogEntry_Action = 0
	LogEntry_Set          LogEntry_Action = 1
	LogEntry_ChangeSpread LogEntry_Action = 2
)

func (LogEntry_Action) EnumDescriptor

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

func (LogEntry_Action) String

func (x LogEntry_Action) String() string

type Mode

type Mode uint8

Mode indicates the way that gRPC client communicate with cassemdb cluster.

const (
	// Mode_R means read only
	Mode_R Mode = iota + 1
	// Mode_X means read / write, but only communicate with leader node.
	Mode_X
)

type ParentDirectoryChange

type ParentDirectoryChange struct {
	Change               *Change  `protobuf:"bytes,1,opt,name=change,proto3" json:"change,omitempty"`
	SpecificTopic        string   `protobuf:"bytes,2,opt,name=specificTopic,proto3" json:"specificTopic,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ParentDirectoryChange) Descriptor

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

func (*ParentDirectoryChange) GetChange

func (m *ParentDirectoryChange) GetChange() *Change

func (*ParentDirectoryChange) GetSpecificTopic

func (m *ParentDirectoryChange) GetSpecificTopic() string

func (*ParentDirectoryChange) ProtoMessage

func (*ParentDirectoryChange) ProtoMessage()

func (*ParentDirectoryChange) Reset

func (m *ParentDirectoryChange) Reset()

func (*ParentDirectoryChange) String

func (m *ParentDirectoryChange) String() string

func (*ParentDirectoryChange) Topic

func (m *ParentDirectoryChange) Topic() string

func (*ParentDirectoryChange) Type

func (*ParentDirectoryChange) Validate

func (m *ParentDirectoryChange) Validate() error

Validate checks the field values on ParentDirectoryChange with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*ParentDirectoryChange) XXX_DiscardUnknown

func (m *ParentDirectoryChange) XXX_DiscardUnknown()

func (*ParentDirectoryChange) XXX_Marshal

func (m *ParentDirectoryChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParentDirectoryChange) XXX_Merge

func (m *ParentDirectoryChange) XXX_Merge(src proto.Message)

func (*ParentDirectoryChange) XXX_Size

func (m *ParentDirectoryChange) XXX_Size() int

func (*ParentDirectoryChange) XXX_Unmarshal

func (m *ParentDirectoryChange) XXX_Unmarshal(b []byte) error

type ParentDirectoryChangeValidationError

type ParentDirectoryChangeValidationError struct {
	// contains filtered or unexported fields
}

ParentDirectoryChangeValidationError is the validation error returned by ParentDirectoryChange.Validate if the designated constraints aren't met.

func (ParentDirectoryChangeValidationError) Cause

Cause function returns cause value.

func (ParentDirectoryChangeValidationError) Error

Error satisfies the builtin error interface

func (ParentDirectoryChangeValidationError) ErrorName

ErrorName returns error name.

func (ParentDirectoryChangeValidationError) Field

Field function returns field value.

func (ParentDirectoryChangeValidationError) Key

Key function returns key value.

func (ParentDirectoryChangeValidationError) Reason

Reason function returns reason value.

type Propose

type Propose struct {
	Entry *LogEntry
	ErrC  chan<- error
}

Propose is wrapper of log entry, and only used by node internal.

func NewPropose

func NewPropose(entry *LogEntry, errC chan<- error) *Propose

type RangeReq

type RangeReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Seek                 string   `protobuf:"bytes,2,opt,name=seek,proto3" json:"seek,omitempty"`
	Limit                int32    `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RangeReq) Descriptor

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

func (*RangeReq) GetKey

func (m *RangeReq) GetKey() string

func (*RangeReq) GetLimit

func (m *RangeReq) GetLimit() int32

func (*RangeReq) GetSeek

func (m *RangeReq) GetSeek() string

func (*RangeReq) ProtoMessage

func (*RangeReq) ProtoMessage()

func (*RangeReq) Reset

func (m *RangeReq) Reset()

func (*RangeReq) String

func (m *RangeReq) String() string

func (*RangeReq) Validate

func (m *RangeReq) Validate() error

Validate checks the field values on RangeReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*RangeReq) XXX_DiscardUnknown

func (m *RangeReq) XXX_DiscardUnknown()

func (*RangeReq) XXX_Marshal

func (m *RangeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangeReq) XXX_Merge

func (m *RangeReq) XXX_Merge(src proto.Message)

func (*RangeReq) XXX_Size

func (m *RangeReq) XXX_Size() int

func (*RangeReq) XXX_Unmarshal

func (m *RangeReq) XXX_Unmarshal(b []byte) error

type RangeReqValidationError

type RangeReqValidationError struct {
	// contains filtered or unexported fields
}

RangeReqValidationError is the validation error returned by RangeReq.Validate if the designated constraints aren't met.

func (RangeReqValidationError) Cause

func (e RangeReqValidationError) Cause() error

Cause function returns cause value.

func (RangeReqValidationError) Error

func (e RangeReqValidationError) Error() string

Error satisfies the builtin error interface

func (RangeReqValidationError) ErrorName

func (e RangeReqValidationError) ErrorName() string

ErrorName returns error name.

func (RangeReqValidationError) Field

func (e RangeReqValidationError) Field() string

Field function returns field value.

func (RangeReqValidationError) Key

func (e RangeReqValidationError) Key() bool

Key function returns key value.

func (RangeReqValidationError) Reason

func (e RangeReqValidationError) Reason() string

Reason function returns reason value.

type RangeResp

type RangeResp struct {
	Entities             []*Entity `protobuf:"bytes,1,rep,name=entities,proto3" json:"entities,omitempty"`
	HasMore              bool      `protobuf:"varint,2,opt,name=hasMore,proto3" json:"hasMore,omitempty"`
	NextSeekKey          string    `protobuf:"bytes,3,opt,name=nextSeekKey,proto3" json:"nextSeekKey,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

func (*RangeResp) Descriptor

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

func (*RangeResp) GetEntities

func (m *RangeResp) GetEntities() []*Entity

func (*RangeResp) GetHasMore

func (m *RangeResp) GetHasMore() bool

func (*RangeResp) GetNextSeekKey

func (m *RangeResp) GetNextSeekKey() string

func (*RangeResp) ProtoMessage

func (*RangeResp) ProtoMessage()

func (*RangeResp) Reset

func (m *RangeResp) Reset()

func (*RangeResp) String

func (m *RangeResp) String() string

func (*RangeResp) Validate

func (m *RangeResp) Validate() error

Validate checks the field values on RangeResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*RangeResp) XXX_DiscardUnknown

func (m *RangeResp) XXX_DiscardUnknown()

func (*RangeResp) XXX_Marshal

func (m *RangeResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RangeResp) XXX_Merge

func (m *RangeResp) XXX_Merge(src proto.Message)

func (*RangeResp) XXX_Size

func (m *RangeResp) XXX_Size() int

func (*RangeResp) XXX_Unmarshal

func (m *RangeResp) XXX_Unmarshal(b []byte) error

type RangeRespValidationError

type RangeRespValidationError struct {
	// contains filtered or unexported fields
}

RangeRespValidationError is the validation error returned by RangeResp.Validate if the designated constraints aren't met.

func (RangeRespValidationError) Cause

func (e RangeRespValidationError) Cause() error

Cause function returns cause value.

func (RangeRespValidationError) Error

func (e RangeRespValidationError) Error() string

Error satisfies the builtin error interface

func (RangeRespValidationError) ErrorName

func (e RangeRespValidationError) ErrorName() string

ErrorName returns error name.

func (RangeRespValidationError) Field

func (e RangeRespValidationError) Field() string

Field function returns field value.

func (RangeRespValidationError) Key

Key function returns key value.

func (RangeRespValidationError) Reason

func (e RangeRespValidationError) Reason() string

Reason function returns reason value.

type SetCommand

type SetCommand struct {
	DeleteKey            string   `protobuf:"bytes,1,opt,name=deleteKey,proto3" json:"deleteKey,omitempty"`
	IsDir                bool     `protobuf:"varint,2,opt,name=isDir,proto3" json:"isDir,omitempty"`
	SetKey               string   `protobuf:"bytes,3,opt,name=setKey,proto3" json:"setKey,omitempty"`
	Value                *Entity  `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetCommand) Action

func (*SetCommand) Action() LogEntry_Action

func (*SetCommand) Descriptor

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

func (*SetCommand) GetDeleteKey

func (m *SetCommand) GetDeleteKey() string

func (*SetCommand) GetIsDir

func (m *SetCommand) GetIsDir() bool

func (*SetCommand) GetSetKey

func (m *SetCommand) GetSetKey() string

func (*SetCommand) GetValue

func (m *SetCommand) GetValue() *Entity

func (*SetCommand) ProtoMessage

func (*SetCommand) ProtoMessage()

func (*SetCommand) Reset

func (m *SetCommand) Reset()

func (*SetCommand) String

func (m *SetCommand) String() string

func (*SetCommand) Validate

func (m *SetCommand) Validate() error

Validate checks the field values on SetCommand with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*SetCommand) XXX_DiscardUnknown

func (m *SetCommand) XXX_DiscardUnknown()

func (*SetCommand) XXX_Marshal

func (m *SetCommand) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetCommand) XXX_Merge

func (m *SetCommand) XXX_Merge(src proto.Message)

func (*SetCommand) XXX_Size

func (m *SetCommand) XXX_Size() int

func (*SetCommand) XXX_Unmarshal

func (m *SetCommand) XXX_Unmarshal(b []byte) error

type SetCommandValidationError

type SetCommandValidationError struct {
	// contains filtered or unexported fields
}

SetCommandValidationError is the validation error returned by SetCommand.Validate if the designated constraints aren't met.

func (SetCommandValidationError) Cause

func (e SetCommandValidationError) Cause() error

Cause function returns cause value.

func (SetCommandValidationError) Error

Error satisfies the builtin error interface

func (SetCommandValidationError) ErrorName

func (e SetCommandValidationError) ErrorName() string

ErrorName returns error name.

func (SetCommandValidationError) Field

Field function returns field value.

func (SetCommandValidationError) Key

Key function returns key value.

func (SetCommandValidationError) Reason

func (e SetCommandValidationError) Reason() string

Reason function returns reason value.

type SetKVReq

type SetKVReq struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	IsDir bool   `protobuf:"varint,2,opt,name=isDir,proto3" json:"isDir,omitempty"`
	Ttl   int32  `protobuf:"varint,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// val's size in [1, 256K] Byte
	Val                  []byte   `protobuf:"bytes,4,opt,name=val,proto3" json:"val,omitempty"`
	Overwrite            bool     `protobuf:"varint,5,opt,name=overwrite,proto3" json:"overwrite,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SetKVReq) Descriptor

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

func (*SetKVReq) GetIsDir

func (m *SetKVReq) GetIsDir() bool

func (*SetKVReq) GetKey

func (m *SetKVReq) GetKey() string

func (*SetKVReq) GetOverwrite

func (m *SetKVReq) GetOverwrite() bool

func (*SetKVReq) GetTtl

func (m *SetKVReq) GetTtl() int32

func (*SetKVReq) GetVal

func (m *SetKVReq) GetVal() []byte

func (*SetKVReq) ProtoMessage

func (*SetKVReq) ProtoMessage()

func (*SetKVReq) Reset

func (m *SetKVReq) Reset()

func (*SetKVReq) String

func (m *SetKVReq) String() string

func (*SetKVReq) Validate

func (m *SetKVReq) Validate() error

Validate checks the field values on SetKVReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*SetKVReq) XXX_DiscardUnknown

func (m *SetKVReq) XXX_DiscardUnknown()

func (*SetKVReq) XXX_Marshal

func (m *SetKVReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SetKVReq) XXX_Merge

func (m *SetKVReq) XXX_Merge(src proto.Message)

func (*SetKVReq) XXX_Size

func (m *SetKVReq) XXX_Size() int

func (*SetKVReq) XXX_Unmarshal

func (m *SetKVReq) XXX_Unmarshal(b []byte) error

type SetKVReqValidationError

type SetKVReqValidationError struct {
	// contains filtered or unexported fields
}

SetKVReqValidationError is the validation error returned by SetKVReq.Validate if the designated constraints aren't met.

func (SetKVReqValidationError) Cause

func (e SetKVReqValidationError) Cause() error

Cause function returns cause value.

func (SetKVReqValidationError) Error

func (e SetKVReqValidationError) Error() string

Error satisfies the builtin error interface

func (SetKVReqValidationError) ErrorName

func (e SetKVReqValidationError) ErrorName() string

ErrorName returns error name.

func (SetKVReqValidationError) Field

func (e SetKVReqValidationError) Field() string

Field function returns field value.

func (SetKVReqValidationError) Key

func (e SetKVReqValidationError) Key() bool

Key function returns key value.

func (SetKVReqValidationError) Reason

func (e SetKVReqValidationError) Reason() string

Reason function returns reason value.

type TtlReq

type TtlReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TtlReq) Descriptor

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

func (*TtlReq) GetKey

func (m *TtlReq) GetKey() string

func (*TtlReq) ProtoMessage

func (*TtlReq) ProtoMessage()

func (*TtlReq) Reset

func (m *TtlReq) Reset()

func (*TtlReq) String

func (m *TtlReq) String() string

func (*TtlReq) Validate

func (m *TtlReq) Validate() error

Validate checks the field values on TtlReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TtlReq) XXX_DiscardUnknown

func (m *TtlReq) XXX_DiscardUnknown()

func (*TtlReq) XXX_Marshal

func (m *TtlReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TtlReq) XXX_Merge

func (m *TtlReq) XXX_Merge(src proto.Message)

func (*TtlReq) XXX_Size

func (m *TtlReq) XXX_Size() int

func (*TtlReq) XXX_Unmarshal

func (m *TtlReq) XXX_Unmarshal(b []byte) error

type TtlReqValidationError

type TtlReqValidationError struct {
	// contains filtered or unexported fields
}

TtlReqValidationError is the validation error returned by TtlReq.Validate if the designated constraints aren't met.

func (TtlReqValidationError) Cause

func (e TtlReqValidationError) Cause() error

Cause function returns cause value.

func (TtlReqValidationError) Error

func (e TtlReqValidationError) Error() string

Error satisfies the builtin error interface

func (TtlReqValidationError) ErrorName

func (e TtlReqValidationError) ErrorName() string

ErrorName returns error name.

func (TtlReqValidationError) Field

func (e TtlReqValidationError) Field() string

Field function returns field value.

func (TtlReqValidationError) Key

func (e TtlReqValidationError) Key() bool

Key function returns key value.

func (TtlReqValidationError) Reason

func (e TtlReqValidationError) Reason() string

Reason function returns reason value.

type TtlResp

type TtlResp struct {
	Ttl                  int32    `protobuf:"varint,1,opt,name=ttl,proto3" json:"ttl,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TtlResp) Descriptor

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

func (*TtlResp) GetTtl

func (m *TtlResp) GetTtl() int32

func (*TtlResp) ProtoMessage

func (*TtlResp) ProtoMessage()

func (*TtlResp) Reset

func (m *TtlResp) Reset()

func (*TtlResp) String

func (m *TtlResp) String() string

func (*TtlResp) Validate

func (m *TtlResp) Validate() error

Validate checks the field values on TtlResp with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*TtlResp) XXX_DiscardUnknown

func (m *TtlResp) XXX_DiscardUnknown()

func (*TtlResp) XXX_Marshal

func (m *TtlResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TtlResp) XXX_Merge

func (m *TtlResp) XXX_Merge(src proto.Message)

func (*TtlResp) XXX_Size

func (m *TtlResp) XXX_Size() int

func (*TtlResp) XXX_Unmarshal

func (m *TtlResp) XXX_Unmarshal(b []byte) error

type TtlRespValidationError

type TtlRespValidationError struct {
	// contains filtered or unexported fields
}

TtlRespValidationError is the validation error returned by TtlResp.Validate if the designated constraints aren't met.

func (TtlRespValidationError) Cause

func (e TtlRespValidationError) Cause() error

Cause function returns cause value.

func (TtlRespValidationError) Error

func (e TtlRespValidationError) Error() string

Error satisfies the builtin error interface

func (TtlRespValidationError) ErrorName

func (e TtlRespValidationError) ErrorName() string

ErrorName returns error name.

func (TtlRespValidationError) Field

func (e TtlRespValidationError) Field() string

Field function returns field value.

func (TtlRespValidationError) Key

func (e TtlRespValidationError) Key() bool

Key function returns key value.

func (TtlRespValidationError) Reason

func (e TtlRespValidationError) Reason() string

Reason function returns reason value.

type UnimplementedKVServer

type UnimplementedKVServer struct {
}

UnimplementedKVServer can be embedded to have forward compatible implementations.

func (*UnimplementedKVServer) Expire

func (*UnimplementedKVServer) Expire(ctx context.Context, req *ExpireReq) (*Empty, error)

func (*UnimplementedKVServer) GetKV

func (*UnimplementedKVServer) GetKVs

func (*UnimplementedKVServer) Range

func (*UnimplementedKVServer) SetKV

func (*UnimplementedKVServer) SetKV(ctx context.Context, req *SetKVReq) (*Empty, error)

func (*UnimplementedKVServer) TTL

func (*UnimplementedKVServer) UnsetKV

func (*UnimplementedKVServer) UnsetKV(ctx context.Context, req *UnsetKVReq) (*Empty, error)

func (*UnimplementedKVServer) Watch

type UnsetKVReq

type UnsetKVReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	IsDir                bool     `protobuf:"varint,2,opt,name=isDir,proto3" json:"isDir,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UnsetKVReq) Descriptor

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

func (*UnsetKVReq) GetIsDir

func (m *UnsetKVReq) GetIsDir() bool

func (*UnsetKVReq) GetKey

func (m *UnsetKVReq) GetKey() string

func (*UnsetKVReq) ProtoMessage

func (*UnsetKVReq) ProtoMessage()

func (*UnsetKVReq) Reset

func (m *UnsetKVReq) Reset()

func (*UnsetKVReq) String

func (m *UnsetKVReq) String() string

func (*UnsetKVReq) Validate

func (m *UnsetKVReq) Validate() error

Validate checks the field values on UnsetKVReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*UnsetKVReq) XXX_DiscardUnknown

func (m *UnsetKVReq) XXX_DiscardUnknown()

func (*UnsetKVReq) XXX_Marshal

func (m *UnsetKVReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UnsetKVReq) XXX_Merge

func (m *UnsetKVReq) XXX_Merge(src proto.Message)

func (*UnsetKVReq) XXX_Size

func (m *UnsetKVReq) XXX_Size() int

func (*UnsetKVReq) XXX_Unmarshal

func (m *UnsetKVReq) XXX_Unmarshal(b []byte) error

type UnsetKVReqValidationError

type UnsetKVReqValidationError struct {
	// contains filtered or unexported fields
}

UnsetKVReqValidationError is the validation error returned by UnsetKVReq.Validate if the designated constraints aren't met.

func (UnsetKVReqValidationError) Cause

func (e UnsetKVReqValidationError) Cause() error

Cause function returns cause value.

func (UnsetKVReqValidationError) Error

Error satisfies the builtin error interface

func (UnsetKVReqValidationError) ErrorName

func (e UnsetKVReqValidationError) ErrorName() string

ErrorName returns error name.

func (UnsetKVReqValidationError) Field

Field function returns field value.

func (UnsetKVReqValidationError) Key

Key function returns key value.

func (UnsetKVReqValidationError) Reason

func (e UnsetKVReqValidationError) Reason() string

Reason function returns reason value.

type WatchReq

type WatchReq struct {
	Keys                 []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WatchReq) Descriptor

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

func (*WatchReq) GetKeys

func (m *WatchReq) GetKeys() []string

func (*WatchReq) ProtoMessage

func (*WatchReq) ProtoMessage()

func (*WatchReq) Reset

func (m *WatchReq) Reset()

func (*WatchReq) String

func (m *WatchReq) String() string

func (*WatchReq) Validate

func (m *WatchReq) Validate() error

Validate checks the field values on WatchReq with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

func (*WatchReq) XXX_DiscardUnknown

func (m *WatchReq) XXX_DiscardUnknown()

func (*WatchReq) XXX_Marshal

func (m *WatchReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WatchReq) XXX_Merge

func (m *WatchReq) XXX_Merge(src proto.Message)

func (*WatchReq) XXX_Size

func (m *WatchReq) XXX_Size() int

func (*WatchReq) XXX_Unmarshal

func (m *WatchReq) XXX_Unmarshal(b []byte) error

type WatchReqValidationError

type WatchReqValidationError struct {
	// contains filtered or unexported fields
}

WatchReqValidationError is the validation error returned by WatchReq.Validate if the designated constraints aren't met.

func (WatchReqValidationError) Cause

func (e WatchReqValidationError) Cause() error

Cause function returns cause value.

func (WatchReqValidationError) Error

func (e WatchReqValidationError) Error() string

Error satisfies the builtin error interface

func (WatchReqValidationError) ErrorName

func (e WatchReqValidationError) ErrorName() string

ErrorName returns error name.

func (WatchReqValidationError) Field

func (e WatchReqValidationError) Field() string

Field function returns field value.

func (WatchReqValidationError) Key

func (e WatchReqValidationError) Key() bool

Key function returns key value.

func (WatchReqValidationError) Reason

func (e WatchReqValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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