crdt2

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LWWRegisterClockType_name = map[int32]string{
		0: "DEFAULT",
		1: "REVERSE",
		2: "CUSTOM",
		3: "CUSTOM_AUTO_INCREMENT",
	}
	LWWRegisterClockType_value = map[string]int32{
		"DEFAULT":               0,
		"REVERSE":               1,
		"CUSTOM":                2,
		"CUSTOM_AUTO_INCREMENT": 3,
	}
)

Enum value maps for LWWRegisterClockType.

View Source
var (
	UpdateWriteConsistency_name = map[int32]string{
		0: "LOCAL",
		1: "MAJORITY",
		2: "ALL",
	}
	UpdateWriteConsistency_value = map[string]int32{
		"LOCAL":    0,
		"MAJORITY": 1,
		"ALL":      2,
	}
)

Enum value maps for UpdateWriteConsistency.

View Source
var File_tck_crdt2_proto protoreflect.FileDescriptor

Functions

func NewCrdtConfiguredEntity

func NewCrdtConfiguredEntity(id crdt.EntityID) crdt.EntityHandler

func NewCrdtTckModelEntity

func NewCrdtTckModelEntity(id crdt.EntityID) crdt.EntityHandler

func NewCrdtTwoEntity

func NewCrdtTwoEntity(id crdt.EntityID) crdt.EntityHandler

func RegisterCrdtConfiguredServer

func RegisterCrdtConfiguredServer(s grpc.ServiceRegistrar, srv CrdtConfiguredServer)

func RegisterCrdtTckModelServer

func RegisterCrdtTckModelServer(s grpc.ServiceRegistrar, srv CrdtTckModelServer)

func RegisterCrdtTwoServer

func RegisterCrdtTwoServer(s grpc.ServiceRegistrar, srv CrdtTwoServer)

Types

type CrdtConfiguredClient

type CrdtConfiguredClient interface {
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

CrdtConfiguredClient is the client API for CrdtConfigured 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 CrdtConfiguredEntity

type CrdtConfiguredEntity struct {
}

func (CrdtConfiguredEntity) Default

func (CrdtConfiguredEntity) Default(ctx *crdt.Context) (crdt.CRDT, error)

func (CrdtConfiguredEntity) HandleCommand

func (CrdtConfiguredEntity) HandleCommand(ctx *crdt.CommandContext, name string, msg proto.Message) (*any.Any, error)

func (CrdtConfiguredEntity) Set

func (CrdtConfiguredEntity) Set(ctx *crdt.Context, state crdt.CRDT) error

type CrdtConfiguredServer

type CrdtConfiguredServer interface {
	Call(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

CrdtConfiguredServer is the server API for CrdtConfigured service. All implementations must embed UnimplementedCrdtConfiguredServer for forward compatibility

type CrdtTckModelClient

type CrdtTckModelClient interface {
	Process(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	ProcessStreamed(ctx context.Context, in *StreamedRequest, opts ...grpc.CallOption) (CrdtTckModel_ProcessStreamedClient, error)
}

CrdtTckModelClient is the client API for CrdtTckModel 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 CrdtTckModelEntity

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

func (CrdtTckModelEntity) Default

func (CrdtTckModelEntity) Default(ctx *crdt.Context) (crdt.CRDT, error)

func (*CrdtTckModelEntity) HandleCommand

func (e *CrdtTckModelEntity) HandleCommand(ctx *crdt.CommandContext, name string, msg proto.Message) (*any.Any, error)

func (*CrdtTckModelEntity) Set

func (e *CrdtTckModelEntity) Set(ctx *crdt.Context, state crdt.CRDT) error

type CrdtTckModelServer

type CrdtTckModelServer interface {
	Process(context.Context, *Request) (*Response, error)
	ProcessStreamed(*StreamedRequest, CrdtTckModel_ProcessStreamedServer) error
	// contains filtered or unexported methods
}

CrdtTckModelServer is the server API for CrdtTckModel service. All implementations must embed UnimplementedCrdtTckModelServer for forward compatibility

type CrdtTckModel_ProcessStreamedClient

type CrdtTckModel_ProcessStreamedClient interface {
	Recv() (*Response, error)
	grpc.ClientStream
}

type CrdtTckModel_ProcessStreamedServer

type CrdtTckModel_ProcessStreamedServer interface {
	Send(*Response) error
	grpc.ServerStream
}

type CrdtTwoClient

type CrdtTwoClient interface {
	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

CrdtTwoClient is the client API for CrdtTwo service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCrdtTwoClient

func NewCrdtTwoClient(cc grpc.ClientConnInterface) CrdtTwoClient

type CrdtTwoEntity

type CrdtTwoEntity struct{}

func (CrdtTwoEntity) Default

func (CrdtTwoEntity) Default(ctx *crdt.Context) (crdt.CRDT, error)

func (CrdtTwoEntity) HandleCommand

func (CrdtTwoEntity) HandleCommand(ctx *crdt.CommandContext, name string, msg proto.Message) (*any.Any, error)

func (CrdtTwoEntity) Set

func (CrdtTwoEntity) Set(ctx *crdt.Context, state crdt.CRDT) error

type CrdtTwoServer

type CrdtTwoServer interface {
	Call(context.Context, *Request) (*Response, error)
	// contains filtered or unexported methods
}

CrdtTwoServer is the server API for CrdtTwo service. All implementations must embed UnimplementedCrdtTwoServer for forward compatibility

type Delete

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

Delete the CRDT.

func (*Delete) Descriptor deprecated

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

Deprecated: Use Delete.ProtoReflect.Descriptor instead.

func (*Delete) ProtoMessage

func (*Delete) ProtoMessage()

func (*Delete) ProtoReflect

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

func (*Delete) Reset

func (x *Delete) Reset()

func (*Delete) String

func (x *Delete) String() string

type Effect

type Effect struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Synchronous bool   `protobuf:"varint,2,opt,name=synchronous,proto3" json:"synchronous,omitempty"`
	// contains filtered or unexported fields
}

Add a side effect to the reply, to `cloudstate.tck.model.CrdtTwo/Call`. The payload must be an `OtherRequest` message with the given `id`. The side effect should be marked synchronous based on the given `synchronous` value.

func (*Effect) Descriptor deprecated

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

Deprecated: Use Effect.ProtoReflect.Descriptor instead.

func (*Effect) GetId

func (x *Effect) GetId() string

func (*Effect) GetSynchronous

func (x *Effect) GetSynchronous() bool

func (*Effect) ProtoMessage

func (*Effect) ProtoMessage()

func (*Effect) ProtoReflect

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

func (*Effect) Reset

func (x *Effect) Reset()

func (*Effect) String

func (x *Effect) String() string

type Fail

type Fail struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Fail the current command with the given description `message`.

func (*Fail) Descriptor deprecated

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

Deprecated: Use Fail.ProtoReflect.Descriptor instead.

func (*Fail) GetMessage

func (x *Fail) GetMessage() string

func (*Fail) ProtoMessage

func (*Fail) ProtoMessage()

func (*Fail) ProtoReflect

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

func (*Fail) Reset

func (x *Fail) Reset()

func (*Fail) String

func (x *Fail) String() string

type FlagUpdate

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

Update a Flag CRDT by enabling it.

func (*FlagUpdate) Descriptor deprecated

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

Deprecated: Use FlagUpdate.ProtoReflect.Descriptor instead.

func (*FlagUpdate) ProtoMessage

func (*FlagUpdate) ProtoMessage()

func (*FlagUpdate) ProtoReflect

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

func (*FlagUpdate) Reset

func (x *FlagUpdate) Reset()

func (*FlagUpdate) String

func (x *FlagUpdate) String() string

type FlagValue

type FlagValue struct {
	Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The current state of a Flag CRDT.

func (*FlagValue) Descriptor deprecated

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

Deprecated: Use FlagValue.ProtoReflect.Descriptor instead.

func (*FlagValue) GetValue

func (x *FlagValue) GetValue() bool

func (*FlagValue) ProtoMessage

func (*FlagValue) ProtoMessage()

func (*FlagValue) ProtoReflect

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

func (*FlagValue) Reset

func (x *FlagValue) Reset()

func (*FlagValue) String

func (x *FlagValue) String() string

type Forward

type Forward struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

Replace the response with a forward to `cloudstate.tck.model.CrdtTwo/Call`. The payload must be an `OtherRequest` message with the given `id`.

func (*Forward) Descriptor deprecated

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

Deprecated: Use Forward.ProtoReflect.Descriptor instead.

func (*Forward) GetId

func (x *Forward) GetId() string

func (*Forward) ProtoMessage

func (*Forward) ProtoMessage()

func (*Forward) ProtoReflect

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

func (*Forward) Reset

func (x *Forward) Reset()

func (*Forward) String

func (x *Forward) String() string

type GCounterUpdate

type GCounterUpdate struct {
	Increment uint64 `protobuf:"varint,1,opt,name=increment,proto3" json:"increment,omitempty"`
	// contains filtered or unexported fields
}

Update a GCounter CRDT with an increment.

func (*GCounterUpdate) Descriptor deprecated

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

Deprecated: Use GCounterUpdate.ProtoReflect.Descriptor instead.

func (*GCounterUpdate) GetIncrement

func (x *GCounterUpdate) GetIncrement() uint64

func (*GCounterUpdate) ProtoMessage

func (*GCounterUpdate) ProtoMessage()

func (*GCounterUpdate) ProtoReflect

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

func (*GCounterUpdate) Reset

func (x *GCounterUpdate) Reset()

func (*GCounterUpdate) String

func (x *GCounterUpdate) String() string

type GCounterValue

type GCounterValue struct {
	Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The current state of a GCounter CRDT.

func (*GCounterValue) Descriptor deprecated

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

Deprecated: Use GCounterValue.ProtoReflect.Descriptor instead.

func (*GCounterValue) GetValue

func (x *GCounterValue) GetValue() uint64

func (*GCounterValue) ProtoMessage

func (*GCounterValue) ProtoMessage()

func (*GCounterValue) ProtoReflect

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

func (*GCounterValue) Reset

func (x *GCounterValue) Reset()

func (*GCounterValue) String

func (x *GCounterValue) String() string

type GSetUpdate

type GSetUpdate struct {
	Add string `protobuf:"bytes,1,opt,name=add,proto3" json:"add,omitempty"`
	// contains filtered or unexported fields
}

Update a GSet CRDT with an additional element.

func (*GSetUpdate) Descriptor deprecated

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

Deprecated: Use GSetUpdate.ProtoReflect.Descriptor instead.

func (*GSetUpdate) GetAdd

func (x *GSetUpdate) GetAdd() string

func (*GSetUpdate) ProtoMessage

func (*GSetUpdate) ProtoMessage()

func (*GSetUpdate) ProtoReflect

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

func (*GSetUpdate) Reset

func (x *GSetUpdate) Reset()

func (*GSetUpdate) String

func (x *GSetUpdate) String() string

type GSetValue

type GSetValue struct {
	Elements []string `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

The current state of a GSet CRDT. Elements should be sorted, for testing of responses.

func (*GSetValue) Descriptor deprecated

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

Deprecated: Use GSetValue.ProtoReflect.Descriptor instead.

func (*GSetValue) GetElements

func (x *GSetValue) GetElements() []string

func (*GSetValue) ProtoMessage

func (*GSetValue) ProtoMessage()

func (*GSetValue) ProtoReflect

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

func (*GSetValue) Reset

func (x *GSetValue) Reset()

func (*GSetValue) String

func (x *GSetValue) String() string

type LWWRegisterClock

type LWWRegisterClock struct {
	ClockType        LWWRegisterClockType `protobuf:"varint,1,opt,name=clockType,proto3,enum=cloudstate.tck.model.crdt.LWWRegisterClockType" json:"clockType,omitempty"`
	CustomClockValue int64                `protobuf:"varint,2,opt,name=customClockValue,proto3" json:"customClockValue,omitempty"`
	// contains filtered or unexported fields
}

Clock for LWWRegister updates.

func (*LWWRegisterClock) Descriptor deprecated

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

Deprecated: Use LWWRegisterClock.ProtoReflect.Descriptor instead.

func (*LWWRegisterClock) GetClockType

func (x *LWWRegisterClock) GetClockType() LWWRegisterClockType

func (*LWWRegisterClock) GetCustomClockValue

func (x *LWWRegisterClock) GetCustomClockValue() int64

func (*LWWRegisterClock) ProtoMessage

func (*LWWRegisterClock) ProtoMessage()

func (*LWWRegisterClock) ProtoReflect

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

func (*LWWRegisterClock) Reset

func (x *LWWRegisterClock) Reset()

func (*LWWRegisterClock) String

func (x *LWWRegisterClock) String() string

type LWWRegisterClockType

type LWWRegisterClockType int32

Type of clock for LWWRegister updates.

const (
	LWWRegisterClockType_DEFAULT               LWWRegisterClockType = 0
	LWWRegisterClockType_REVERSE               LWWRegisterClockType = 1
	LWWRegisterClockType_CUSTOM                LWWRegisterClockType = 2
	LWWRegisterClockType_CUSTOM_AUTO_INCREMENT LWWRegisterClockType = 3
)

func (LWWRegisterClockType) Descriptor

func (LWWRegisterClockType) Enum

func (LWWRegisterClockType) EnumDescriptor deprecated

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

Deprecated: Use LWWRegisterClockType.Descriptor instead.

func (LWWRegisterClockType) Number

func (LWWRegisterClockType) String

func (x LWWRegisterClockType) String() string

func (LWWRegisterClockType) Type

type LWWRegisterUpdate

type LWWRegisterUpdate struct {
	Value string            `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Clock *LWWRegisterClock `protobuf:"bytes,2,opt,name=clock,proto3" json:"clock,omitempty"`
	// contains filtered or unexported fields
}

Update an LWWRegister CRDT with a new value.

func (*LWWRegisterUpdate) Descriptor deprecated

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

Deprecated: Use LWWRegisterUpdate.ProtoReflect.Descriptor instead.

func (*LWWRegisterUpdate) GetClock

func (x *LWWRegisterUpdate) GetClock() *LWWRegisterClock

func (*LWWRegisterUpdate) GetValue

func (x *LWWRegisterUpdate) GetValue() string

func (*LWWRegisterUpdate) ProtoMessage

func (*LWWRegisterUpdate) ProtoMessage()

func (*LWWRegisterUpdate) ProtoReflect

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

func (*LWWRegisterUpdate) Reset

func (x *LWWRegisterUpdate) Reset()

func (*LWWRegisterUpdate) String

func (x *LWWRegisterUpdate) String() string

type LWWRegisterValue

type LWWRegisterValue struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The current state of an LWWRegister CRDT. Always a string in the TCK model tests.

func (*LWWRegisterValue) Descriptor deprecated

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

Deprecated: Use LWWRegisterValue.ProtoReflect.Descriptor instead.

func (*LWWRegisterValue) GetValue

func (x *LWWRegisterValue) GetValue() string

func (*LWWRegisterValue) ProtoMessage

func (*LWWRegisterValue) ProtoMessage()

func (*LWWRegisterValue) ProtoReflect

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

func (*LWWRegisterValue) Reset

func (x *LWWRegisterValue) Reset()

func (*LWWRegisterValue) String

func (x *LWWRegisterValue) String() string

type ORMapEntryUpdate

type ORMapEntryUpdate struct {
	Key    string  `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Update *Update `protobuf:"bytes,2,opt,name=update,proto3" json:"update,omitempty"`
	// contains filtered or unexported fields
}

Update for an ORMap entry.

func (*ORMapEntryUpdate) Descriptor deprecated

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

Deprecated: Use ORMapEntryUpdate.ProtoReflect.Descriptor instead.

func (*ORMapEntryUpdate) GetKey

func (x *ORMapEntryUpdate) GetKey() string

func (*ORMapEntryUpdate) GetUpdate

func (x *ORMapEntryUpdate) GetUpdate() *Update

func (*ORMapEntryUpdate) ProtoMessage

func (*ORMapEntryUpdate) ProtoMessage()

func (*ORMapEntryUpdate) ProtoReflect

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

func (*ORMapEntryUpdate) Reset

func (x *ORMapEntryUpdate) Reset()

func (*ORMapEntryUpdate) String

func (x *ORMapEntryUpdate) String() string

type ORMapEntryValue

type ORMapEntryValue struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value *State `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The current state of an ORMap entry.

func (*ORMapEntryValue) Descriptor deprecated

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

Deprecated: Use ORMapEntryValue.ProtoReflect.Descriptor instead.

func (*ORMapEntryValue) GetKey

func (x *ORMapEntryValue) GetKey() string

func (*ORMapEntryValue) GetValue

func (x *ORMapEntryValue) GetValue() *State

func (*ORMapEntryValue) ProtoMessage

func (*ORMapEntryValue) ProtoMessage()

func (*ORMapEntryValue) ProtoReflect

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

func (*ORMapEntryValue) Reset

func (x *ORMapEntryValue) Reset()

func (*ORMapEntryValue) String

func (x *ORMapEntryValue) String() string

type ORMapUpdate

type ORMapUpdate struct {

	// Types that are assignable to Action:
	//	*ORMapUpdate_Add
	//	*ORMapUpdate_Update
	//	*ORMapUpdate_Remove
	//	*ORMapUpdate_Clear
	Action isORMapUpdate_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Update an ORMap CRDT by adding, updating, or removing entries, or clearing the map. Value types are determined by the prefix of the key.

func (*ORMapUpdate) Descriptor deprecated

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

Deprecated: Use ORMapUpdate.ProtoReflect.Descriptor instead.

func (*ORMapUpdate) GetAction

func (m *ORMapUpdate) GetAction() isORMapUpdate_Action

func (*ORMapUpdate) GetAdd

func (x *ORMapUpdate) GetAdd() string

func (*ORMapUpdate) GetClear

func (x *ORMapUpdate) GetClear() bool

func (*ORMapUpdate) GetRemove

func (x *ORMapUpdate) GetRemove() string

func (*ORMapUpdate) GetUpdate

func (x *ORMapUpdate) GetUpdate() *ORMapEntryUpdate

func (*ORMapUpdate) ProtoMessage

func (*ORMapUpdate) ProtoMessage()

func (*ORMapUpdate) ProtoReflect

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

func (*ORMapUpdate) Reset

func (x *ORMapUpdate) Reset()

func (*ORMapUpdate) String

func (x *ORMapUpdate) String() string

type ORMapUpdate_Add

type ORMapUpdate_Add struct {
	Add string `protobuf:"bytes,1,opt,name=add,proto3,oneof"`
}

type ORMapUpdate_Clear

type ORMapUpdate_Clear struct {
	Clear bool `protobuf:"varint,4,opt,name=clear,proto3,oneof"`
}

type ORMapUpdate_Remove

type ORMapUpdate_Remove struct {
	Remove string `protobuf:"bytes,3,opt,name=remove,proto3,oneof"`
}

type ORMapUpdate_Update

type ORMapUpdate_Update struct {
	Update *ORMapEntryUpdate `protobuf:"bytes,2,opt,name=update,proto3,oneof"`
}

type ORMapValue

type ORMapValue struct {
	Entries []*ORMapEntryValue `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

The current state of an ORMap CRDT. Entries should be sorted by key, for testing of responses.

func (*ORMapValue) Descriptor deprecated

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

Deprecated: Use ORMapValue.ProtoReflect.Descriptor instead.

func (*ORMapValue) GetEntries

func (x *ORMapValue) GetEntries() []*ORMapEntryValue

func (*ORMapValue) ProtoMessage

func (*ORMapValue) ProtoMessage()

func (*ORMapValue) ProtoReflect

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

func (*ORMapValue) Reset

func (x *ORMapValue) Reset()

func (*ORMapValue) String

func (x *ORMapValue) String() string

type ORSetUpdate

type ORSetUpdate struct {

	// Types that are assignable to Action:
	//	*ORSetUpdate_Add
	//	*ORSetUpdate_Remove
	//	*ORSetUpdate_Clear
	Action isORSetUpdate_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Update an ORSet CRDT by adding or removing elements, or clearing the set.

func (*ORSetUpdate) Descriptor deprecated

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

Deprecated: Use ORSetUpdate.ProtoReflect.Descriptor instead.

func (*ORSetUpdate) GetAction

func (m *ORSetUpdate) GetAction() isORSetUpdate_Action

func (*ORSetUpdate) GetAdd

func (x *ORSetUpdate) GetAdd() string

func (*ORSetUpdate) GetClear

func (x *ORSetUpdate) GetClear() bool

func (*ORSetUpdate) GetRemove

func (x *ORSetUpdate) GetRemove() string

func (*ORSetUpdate) ProtoMessage

func (*ORSetUpdate) ProtoMessage()

func (*ORSetUpdate) ProtoReflect

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

func (*ORSetUpdate) Reset

func (x *ORSetUpdate) Reset()

func (*ORSetUpdate) String

func (x *ORSetUpdate) String() string

type ORSetUpdate_Add

type ORSetUpdate_Add struct {
	Add string `protobuf:"bytes,1,opt,name=add,proto3,oneof"`
}

type ORSetUpdate_Clear

type ORSetUpdate_Clear struct {
	Clear bool `protobuf:"varint,3,opt,name=clear,proto3,oneof"`
}

type ORSetUpdate_Remove

type ORSetUpdate_Remove struct {
	Remove string `protobuf:"bytes,2,opt,name=remove,proto3,oneof"`
}

type ORSetValue

type ORSetValue struct {
	Elements []string `protobuf:"bytes,1,rep,name=elements,proto3" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

The current state of an ORSet CRDT. Elements should be sorted, for testing of responses.

func (*ORSetValue) Descriptor deprecated

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

Deprecated: Use ORSetValue.ProtoReflect.Descriptor instead.

func (*ORSetValue) GetElements

func (x *ORSetValue) GetElements() []string

func (*ORSetValue) ProtoMessage

func (*ORSetValue) ProtoMessage()

func (*ORSetValue) ProtoReflect

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

func (*ORSetValue) Reset

func (x *ORSetValue) Reset()

func (*ORSetValue) String

func (x *ORSetValue) String() string

type PNCounterUpdate

type PNCounterUpdate struct {
	Change int64 `protobuf:"zigzag64,1,opt,name=change,proto3" json:"change,omitempty"`
	// contains filtered or unexported fields
}

Update a PNCounter CRDT with a change.

func (*PNCounterUpdate) Descriptor deprecated

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

Deprecated: Use PNCounterUpdate.ProtoReflect.Descriptor instead.

func (*PNCounterUpdate) GetChange

func (x *PNCounterUpdate) GetChange() int64

func (*PNCounterUpdate) ProtoMessage

func (*PNCounterUpdate) ProtoMessage()

func (*PNCounterUpdate) ProtoReflect

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

func (*PNCounterUpdate) Reset

func (x *PNCounterUpdate) Reset()

func (*PNCounterUpdate) String

func (x *PNCounterUpdate) String() string

type PNCounterValue

type PNCounterValue struct {
	Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

The current state of a PNCounter CRDT.

func (*PNCounterValue) Descriptor deprecated

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

Deprecated: Use PNCounterValue.ProtoReflect.Descriptor instead.

func (*PNCounterValue) GetValue

func (x *PNCounterValue) GetValue() int64

func (*PNCounterValue) ProtoMessage

func (*PNCounterValue) ProtoMessage()

func (*PNCounterValue) ProtoReflect

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

func (*PNCounterValue) Reset

func (x *PNCounterValue) Reset()

func (*PNCounterValue) String

func (x *PNCounterValue) String() string

type Request

type Request struct {
	Id      string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Actions []*RequestAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"`
	// contains filtered or unexported fields
}

A `Request` message contains any actions that the entity should process. Actions must be processed in order. Any actions after a `Fail` may be ignored.

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetActions

func (x *Request) GetActions() []*RequestAction

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type RequestAction

type RequestAction struct {

	// Types that are assignable to Action:
	//	*RequestAction_Update
	//	*RequestAction_Delete
	//	*RequestAction_Forward
	//	*RequestAction_Fail
	//	*RequestAction_Effect
	Action isRequestAction_Action `protobuf_oneof:"action"`
	// contains filtered or unexported fields
}

Each `RequestAction` is one of:

- Update: update the CRDT and return the updated state in the `Response`. - Forward: forward to another service, in place of replying with a `Response`. - Fail: fail the current `Process` command by sending a failure. - Effect: add a side effect to the current reply, forward, or failure. - Delete: request for the CRDT to be deleted.

func (*RequestAction) Descriptor deprecated

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

Deprecated: Use RequestAction.ProtoReflect.Descriptor instead.

func (*RequestAction) GetAction

func (m *RequestAction) GetAction() isRequestAction_Action

func (*RequestAction) GetDelete

func (x *RequestAction) GetDelete() *Delete

func (*RequestAction) GetEffect

func (x *RequestAction) GetEffect() *Effect

func (*RequestAction) GetFail

func (x *RequestAction) GetFail() *Fail

func (*RequestAction) GetForward

func (x *RequestAction) GetForward() *Forward

func (*RequestAction) GetUpdate

func (x *RequestAction) GetUpdate() *Update

func (*RequestAction) ProtoMessage

func (*RequestAction) ProtoMessage()

func (*RequestAction) ProtoReflect

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

func (*RequestAction) Reset

func (x *RequestAction) Reset()

func (*RequestAction) String

func (x *RequestAction) String() string

type RequestAction_Delete

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

type RequestAction_Effect

type RequestAction_Effect struct {
	Effect *Effect `protobuf:"bytes,5,opt,name=effect,proto3,oneof"`
}

type RequestAction_Fail

type RequestAction_Fail struct {
	Fail *Fail `protobuf:"bytes,4,opt,name=fail,proto3,oneof"`
}

type RequestAction_Forward

type RequestAction_Forward struct {
	Forward *Forward `protobuf:"bytes,3,opt,name=forward,proto3,oneof"`
}

type RequestAction_Update

type RequestAction_Update struct {
	Update *Update `protobuf:"bytes,1,opt,name=update,proto3,oneof"`
}

type Response

type Response struct {
	State *State `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

The `Response` message must contain the updated state of the CRDT.

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetState

func (x *Response) GetState() *State

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type State

type State struct {

	// Types that are assignable to Value:
	//	*State_Gcounter
	//	*State_Pncounter
	//	*State_Gset
	//	*State_Orset
	//	*State_Lwwregister
	//	*State_Flag
	//	*State_Ormap
	//	*State_Vote
	Value isState_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

Current state of a CRDT, with specific values for particular CRDT types.

func (*State) Descriptor deprecated

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

Deprecated: Use State.ProtoReflect.Descriptor instead.

func (*State) GetFlag

func (x *State) GetFlag() *FlagValue

func (*State) GetGcounter

func (x *State) GetGcounter() *GCounterValue

func (*State) GetGset

func (x *State) GetGset() *GSetValue

func (*State) GetLwwregister

func (x *State) GetLwwregister() *LWWRegisterValue

func (*State) GetOrmap

func (x *State) GetOrmap() *ORMapValue

func (*State) GetOrset

func (x *State) GetOrset() *ORSetValue

func (*State) GetPncounter

func (x *State) GetPncounter() *PNCounterValue

func (*State) GetValue

func (m *State) GetValue() isState_Value

func (*State) GetVote

func (x *State) GetVote() *VoteValue

func (*State) ProtoMessage

func (*State) ProtoMessage()

func (*State) ProtoReflect

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

func (*State) Reset

func (x *State) Reset()

func (*State) String

func (x *State) String() string

type State_Flag

type State_Flag struct {
	Flag *FlagValue `protobuf:"bytes,6,opt,name=flag,proto3,oneof"`
}

type State_Gcounter

type State_Gcounter struct {
	Gcounter *GCounterValue `protobuf:"bytes,1,opt,name=gcounter,proto3,oneof"`
}

type State_Gset

type State_Gset struct {
	Gset *GSetValue `protobuf:"bytes,3,opt,name=gset,proto3,oneof"`
}

type State_Lwwregister

type State_Lwwregister struct {
	Lwwregister *LWWRegisterValue `protobuf:"bytes,5,opt,name=lwwregister,proto3,oneof"`
}

type State_Ormap

type State_Ormap struct {
	Ormap *ORMapValue `protobuf:"bytes,7,opt,name=ormap,proto3,oneof"`
}

type State_Orset

type State_Orset struct {
	Orset *ORSetValue `protobuf:"bytes,4,opt,name=orset,proto3,oneof"`
}

type State_Pncounter

type State_Pncounter struct {
	Pncounter *PNCounterValue `protobuf:"bytes,2,opt,name=pncounter,proto3,oneof"`
}

type State_Vote

type State_Vote struct {
	Vote *VoteValue `protobuf:"bytes,8,opt,name=vote,proto3,oneof"`
}

type StreamedRequest

type StreamedRequest struct {
	Id            string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	EndState      *State    `protobuf:"bytes,2,opt,name=end_state,json=endState,proto3" json:"end_state,omitempty"`
	CancelUpdate  *Update   `protobuf:"bytes,3,opt,name=cancel_update,json=cancelUpdate,proto3" json:"cancel_update,omitempty"`
	Effects       []*Effect `protobuf:"bytes,4,rep,name=effects,proto3" json:"effects,omitempty"`
	InitialUpdate *Update   `protobuf:"bytes,5,opt,name=initial_update,json=initialUpdate,proto3" json:"initial_update,omitempty"`
	Empty         bool      `protobuf:"varint,6,opt,name=empty,proto3" json:"empty,omitempty"`
	// contains filtered or unexported fields
}

A `StreamedRequest` message contains actions for streamed responses. If `end_state` is set, it specifies a target state for ending the stream. If `cancel_update` is set, it specifies an update to apply when the stream is cancelled. If `effects` is set, it specifies side effects to return with every streamed response. If `initial_update` is set, it specifies an update to apply on the initial request. If `empty` is set, then no responses should be streamed (for testing empty stream connections). Otherwise, the current state should be streamed on changes.

func (*StreamedRequest) Descriptor deprecated

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

Deprecated: Use StreamedRequest.ProtoReflect.Descriptor instead.

func (*StreamedRequest) GetCancelUpdate

func (x *StreamedRequest) GetCancelUpdate() *Update

func (*StreamedRequest) GetEffects

func (x *StreamedRequest) GetEffects() []*Effect

func (*StreamedRequest) GetEmpty

func (x *StreamedRequest) GetEmpty() bool

func (*StreamedRequest) GetEndState

func (x *StreamedRequest) GetEndState() *State

func (*StreamedRequest) GetId

func (x *StreamedRequest) GetId() string

func (*StreamedRequest) GetInitialUpdate

func (x *StreamedRequest) GetInitialUpdate() *Update

func (*StreamedRequest) ProtoMessage

func (*StreamedRequest) ProtoMessage()

func (*StreamedRequest) ProtoReflect

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

func (*StreamedRequest) Reset

func (x *StreamedRequest) Reset()

func (*StreamedRequest) String

func (x *StreamedRequest) String() string

type UnimplementedCrdtConfiguredServer

type UnimplementedCrdtConfiguredServer struct {
}

UnimplementedCrdtConfiguredServer must be embedded to have forward compatible implementations.

func (UnimplementedCrdtConfiguredServer) Call

type UnimplementedCrdtTckModelServer

type UnimplementedCrdtTckModelServer struct {
}

UnimplementedCrdtTckModelServer must be embedded to have forward compatible implementations.

func (UnimplementedCrdtTckModelServer) Process

func (UnimplementedCrdtTckModelServer) ProcessStreamed

type UnimplementedCrdtTwoServer

type UnimplementedCrdtTwoServer struct {
}

UnimplementedCrdtTwoServer must be embedded to have forward compatible implementations.

func (UnimplementedCrdtTwoServer) Call

type UnsafeCrdtConfiguredServer

type UnsafeCrdtConfiguredServer interface {
	// contains filtered or unexported methods
}

UnsafeCrdtConfiguredServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrdtConfiguredServer will result in compilation errors.

type UnsafeCrdtTckModelServer

type UnsafeCrdtTckModelServer interface {
	// contains filtered or unexported methods
}

UnsafeCrdtTckModelServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrdtTckModelServer will result in compilation errors.

type UnsafeCrdtTwoServer

type UnsafeCrdtTwoServer interface {
	// contains filtered or unexported methods
}

UnsafeCrdtTwoServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CrdtTwoServer will result in compilation errors.

type Update

type Update struct {

	// Types that are assignable to Update:
	//	*Update_Gcounter
	//	*Update_Pncounter
	//	*Update_Gset
	//	*Update_Orset
	//	*Update_Lwwregister
	//	*Update_Flag
	//	*Update_Ormap
	//	*Update_Vote
	Update           isUpdate_Update        `protobuf_oneof:"update"`
	WriteConsistency UpdateWriteConsistency `` /* 164-byte string literal not displayed */
	// contains filtered or unexported fields
}

Update the CRDT, with specific update values for particular CRDT types.

func (*Update) Descriptor deprecated

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

Deprecated: Use Update.ProtoReflect.Descriptor instead.

func (*Update) GetFlag

func (x *Update) GetFlag() *FlagUpdate

func (*Update) GetGcounter

func (x *Update) GetGcounter() *GCounterUpdate

func (*Update) GetGset

func (x *Update) GetGset() *GSetUpdate

func (*Update) GetLwwregister

func (x *Update) GetLwwregister() *LWWRegisterUpdate

func (*Update) GetOrmap

func (x *Update) GetOrmap() *ORMapUpdate

func (*Update) GetOrset

func (x *Update) GetOrset() *ORSetUpdate

func (*Update) GetPncounter

func (x *Update) GetPncounter() *PNCounterUpdate

func (*Update) GetUpdate

func (m *Update) GetUpdate() isUpdate_Update

func (*Update) GetVote

func (x *Update) GetVote() *VoteUpdate

func (*Update) GetWriteConsistency

func (x *Update) GetWriteConsistency() UpdateWriteConsistency

func (*Update) ProtoMessage

func (*Update) ProtoMessage()

func (*Update) ProtoReflect

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

func (*Update) Reset

func (x *Update) Reset()

func (*Update) String

func (x *Update) String() string

type UpdateWriteConsistency

type UpdateWriteConsistency int32

The CRDT write consistency setting to use for updates.

const (
	UpdateWriteConsistency_LOCAL    UpdateWriteConsistency = 0
	UpdateWriteConsistency_MAJORITY UpdateWriteConsistency = 1
	UpdateWriteConsistency_ALL      UpdateWriteConsistency = 2
)

func (UpdateWriteConsistency) Descriptor

func (UpdateWriteConsistency) Enum

func (UpdateWriteConsistency) EnumDescriptor deprecated

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

Deprecated: Use UpdateWriteConsistency.Descriptor instead.

func (UpdateWriteConsistency) Number

func (UpdateWriteConsistency) String

func (x UpdateWriteConsistency) String() string

func (UpdateWriteConsistency) Type

type Update_Flag

type Update_Flag struct {
	Flag *FlagUpdate `protobuf:"bytes,6,opt,name=flag,proto3,oneof"`
}

type Update_Gcounter

type Update_Gcounter struct {
	Gcounter *GCounterUpdate `protobuf:"bytes,1,opt,name=gcounter,proto3,oneof"`
}

type Update_Gset

type Update_Gset struct {
	Gset *GSetUpdate `protobuf:"bytes,3,opt,name=gset,proto3,oneof"`
}

type Update_Lwwregister

type Update_Lwwregister struct {
	Lwwregister *LWWRegisterUpdate `protobuf:"bytes,5,opt,name=lwwregister,proto3,oneof"`
}

type Update_Ormap

type Update_Ormap struct {
	Ormap *ORMapUpdate `protobuf:"bytes,7,opt,name=ormap,proto3,oneof"`
}

type Update_Orset

type Update_Orset struct {
	Orset *ORSetUpdate `protobuf:"bytes,4,opt,name=orset,proto3,oneof"`
}

type Update_Pncounter

type Update_Pncounter struct {
	Pncounter *PNCounterUpdate `protobuf:"bytes,2,opt,name=pncounter,proto3,oneof"`
}

type Update_Vote

type Update_Vote struct {
	Vote *VoteUpdate `protobuf:"bytes,8,opt,name=vote,proto3,oneof"`
}

type VoteUpdate

type VoteUpdate struct {
	SelfVote bool `protobuf:"varint,1,opt,name=self_vote,json=selfVote,proto3" json:"self_vote,omitempty"`
	// contains filtered or unexported fields
}

Update a Vote CRDT's self vote.

func (*VoteUpdate) Descriptor deprecated

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

Deprecated: Use VoteUpdate.ProtoReflect.Descriptor instead.

func (*VoteUpdate) GetSelfVote

func (x *VoteUpdate) GetSelfVote() bool

func (*VoteUpdate) ProtoMessage

func (*VoteUpdate) ProtoMessage()

func (*VoteUpdate) ProtoReflect

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

func (*VoteUpdate) Reset

func (x *VoteUpdate) Reset()

func (*VoteUpdate) String

func (x *VoteUpdate) String() string

type VoteValue

type VoteValue struct {
	SelfVote    bool  `protobuf:"varint,1,opt,name=self_vote,json=selfVote,proto3" json:"self_vote,omitempty"`
	VotesFor    int32 `protobuf:"varint,2,opt,name=votes_for,json=votesFor,proto3" json:"votes_for,omitempty"`
	TotalVoters int32 `protobuf:"varint,3,opt,name=total_voters,json=totalVoters,proto3" json:"total_voters,omitempty"`
	// contains filtered or unexported fields
}

The current state of a Vote CRDT.

func (*VoteValue) Descriptor deprecated

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

Deprecated: Use VoteValue.ProtoReflect.Descriptor instead.

func (*VoteValue) GetSelfVote

func (x *VoteValue) GetSelfVote() bool

func (*VoteValue) GetTotalVoters

func (x *VoteValue) GetTotalVoters() int32

func (*VoteValue) GetVotesFor

func (x *VoteValue) GetVotesFor() int32

func (*VoteValue) ProtoMessage

func (*VoteValue) ProtoMessage()

func (*VoteValue) ProtoReflect

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

func (*VoteValue) Reset

func (x *VoteValue) Reset()

func (*VoteValue) String

func (x *VoteValue) String() string

Jump to

Keyboard shortcuts

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