consensus

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Consensus_StealTableOwnership_FullMethodName = "/atlas.consensus.Consensus/StealTableOwnership"
	Consensus_WriteMigration_FullMethodName      = "/atlas.consensus.Consensus/WriteMigration"
	Consensus_AcceptMigration_FullMethodName     = "/atlas.consensus.Consensus/AcceptMigration"
	Consensus_Replicate_FullMethodName           = "/atlas.consensus.Consensus/Replicate"
	Consensus_DeReference_FullMethodName         = "/atlas.consensus.Consensus/DeReference"
	Consensus_Ping_FullMethodName                = "/atlas.consensus.Consensus/Ping"
	Consensus_PrefixScan_FullMethodName          = "/atlas.consensus.Consensus/PrefixScan"
	Consensus_RequestSlots_FullMethodName        = "/atlas.consensus.Consensus/RequestSlots"
	Consensus_Follow_FullMethodName              = "/atlas.consensus.Consensus/Follow"
	Consensus_ReadRecord_FullMethodName          = "/atlas.consensus.Consensus/ReadRecord"
)

Variables

View Source
var (
	AclRole_name = map[int32]string{
		0: "OWNER",
		1: "READER",
		2: "WRITER",
	}
	AclRole_value = map[string]int32{
		"OWNER":  0,
		"READER": 1,
		"WRITER": 2,
	}
)

Enum value maps for AclRole.

View Source
var Consensus_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "atlas.consensus.Consensus",
	HandlerType: (*ConsensusServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "StealTableOwnership",
			Handler:    _Consensus_StealTableOwnership_Handler,
		},
		{
			MethodName: "WriteMigration",
			Handler:    _Consensus_WriteMigration_Handler,
		},
		{
			MethodName: "AcceptMigration",
			Handler:    _Consensus_AcceptMigration_Handler,
		},
		{
			MethodName: "Ping",
			Handler:    _Consensus_Ping_Handler,
		},
		{
			MethodName: "PrefixScan",
			Handler:    _Consensus_PrefixScan_Handler,
		},
		{
			MethodName: "ReadRecord",
			Handler:    _Consensus_ReadRecord_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Replicate",
			Handler:       _Consensus_Replicate_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "DeReference",
			Handler:       _Consensus_DeReference_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "RequestSlots",
			Handler:       _Consensus_RequestSlots_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Follow",
			Handler:       _Consensus_Follow_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "consensus/consensus.proto",
}

Consensus_ServiceDesc is the grpc.ServiceDesc for Consensus service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var DefaultLatencyMatrix = map[string]time.Duration{

	"us-east-1:us-east-1":   1 * time.Millisecond,
	"us-west-2:us-west-2":   1 * time.Millisecond,
	"eu-west-1:eu-west-1":   1 * time.Millisecond,
	"ap-south-1:ap-south-1": 1 * time.Millisecond,

	"us-east-1:us-west-2": 65 * time.Millisecond,
	"us-west-2:us-east-1": 65 * time.Millisecond,

	"us-east-1:eu-west-1": 85 * time.Millisecond,
	"eu-west-1:us-east-1": 85 * time.Millisecond,
	"us-west-2:eu-west-1": 140 * time.Millisecond,
	"eu-west-1:us-west-2": 140 * time.Millisecond,

	"us-east-1:ap-south-1": 180 * time.Millisecond,
	"ap-south-1:us-east-1": 180 * time.Millisecond,
	"us-west-2:ap-south-1": 200 * time.Millisecond,
	"ap-south-1:us-west-2": 200 * time.Millisecond,

	"eu-west-1:ap-south-1": 130 * time.Millisecond,
	"ap-south-1:eu-west-1": 130 * time.Millisecond,
}

DefaultLatencyMatrix provides realistic inter-region latencies based on real-world cloud provider measurements (AWS/GCP approximate values).

View Source
var ErrCannotChangeReplicationLevel = errors.New("cannot change replication level of a table")
View Source
var ErrTablePolicyViolation = errors.New("table policy violation")
View Source
var File_consensus_consensus_proto protoreflect.FileDescriptor

Functions

func DescribeQuorum added in v0.1.0

func DescribeQuorum(ctx context.Context, table string) (q1 []*QuorumNode, q2 []*QuorumNode, err error)

DescribeQuorum computes and returns diagnostic information about the potential quorum for a given table, showing all known nodes regardless of their current health status. This is intended for diagnostic purposes only.

func IsOwned added in v0.2.0

func IsOwned(key []byte) bool

func IsOwnerlessKey added in v0.2.0

func IsOwnerlessKey(key []byte) bool

func RegisterConsensusServer added in v0.1.0

func RegisterConsensusServer(s grpc.ServiceRegistrar, srv ConsensusServer)

func WriteMutation added in v0.2.0

func WriteMutation(ctx context.Context, key []byte, mutation *RecordMutation) error

WriteMutation writes a mutation to the consensus log using the WPaxos protocol. It encapsulates the complete flow: - Phase 1 (if not owned): Steal ownership via Q1 broadcast quorum - Phase 2: Write to Q2 majority quorum - Phase 3: Commit to Q2 majority quorum

The mutation's Slot and Ballot fields are populated internally.

Types

type Acl added in v0.2.0

type Acl struct {
	Owners  []*Principal `protobuf:"bytes,1,rep,name=owners,proto3" json:"owners,omitempty"`
	Readers []*Principal `protobuf:"bytes,2,rep,name=readers,proto3" json:"readers,omitempty"`
	Writers []*Principal `protobuf:"bytes,3,rep,name=writers,proto3" json:"writers,omitempty"`
	// contains filtered or unexported fields
}

func (*Acl) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Acl.ProtoReflect.Descriptor instead.

func (*Acl) GetOwners added in v0.2.0

func (x *Acl) GetOwners() []*Principal

func (*Acl) GetReaders added in v0.2.0

func (x *Acl) GetReaders() []*Principal

func (*Acl) GetWriters added in v0.2.0

func (x *Acl) GetWriters() []*Principal

func (*Acl) ProtoMessage added in v0.2.0

func (*Acl) ProtoMessage()

func (*Acl) ProtoReflect added in v0.2.0

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

func (*Acl) Reset added in v0.2.0

func (x *Acl) Reset()

func (*Acl) String added in v0.2.0

func (x *Acl) String() string

type AclRole added in v0.2.0

type AclRole int32

Atomic ACL mutations - apply without read-modify-write

const (
	AclRole_OWNER  AclRole = 0
	AclRole_READER AclRole = 1
	AclRole_WRITER AclRole = 2
)

func (AclRole) Descriptor added in v0.2.0

func (AclRole) Descriptor() protoreflect.EnumDescriptor

func (AclRole) Enum added in v0.2.0

func (x AclRole) Enum() *AclRole

func (AclRole) EnumDescriptor deprecated added in v0.2.0

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

Deprecated: Use AclRole.Descriptor instead.

func (AclRole) Number added in v0.2.0

func (x AclRole) Number() protoreflect.EnumNumber

func (AclRole) String added in v0.2.0

func (x AclRole) String() string

func (AclRole) Type added in v0.2.0

func (AclRole) Type() protoreflect.EnumType

type AddPrincipal added in v0.2.0

type AddPrincipal struct {
	Role      AclRole    `protobuf:"varint,1,opt,name=role,proto3,enum=atlas.consensus.AclRole" json:"role,omitempty"`
	Principal *Principal `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
	// contains filtered or unexported fields
}

func (*AddPrincipal) Descriptor deprecated added in v0.2.0

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

Deprecated: Use AddPrincipal.ProtoReflect.Descriptor instead.

func (*AddPrincipal) GetPrincipal added in v0.2.0

func (x *AddPrincipal) GetPrincipal() *Principal

func (*AddPrincipal) GetRole added in v0.2.0

func (x *AddPrincipal) GetRole() AclRole

func (*AddPrincipal) ProtoMessage added in v0.2.0

func (*AddPrincipal) ProtoMessage()

func (*AddPrincipal) ProtoReflect added in v0.2.0

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

func (*AddPrincipal) Reset added in v0.2.0

func (x *AddPrincipal) Reset()

func (*AddPrincipal) String added in v0.2.0

func (x *AddPrincipal) String() string

type Ballot added in v0.2.0

type Ballot struct {
	Key  []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Id   uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Node uint64 `protobuf:"varint,3,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*Ballot) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Ballot.ProtoReflect.Descriptor instead.

func (*Ballot) GetId added in v0.2.0

func (x *Ballot) GetId() uint64

func (*Ballot) GetKey added in v0.2.0

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

func (*Ballot) GetNode added in v0.2.0

func (x *Ballot) GetNode() uint64

func (*Ballot) Less added in v0.2.0

func (b *Ballot) Less(other *Ballot) bool

func (*Ballot) ProtoMessage added in v0.2.0

func (*Ballot) ProtoMessage()

func (*Ballot) ProtoReflect added in v0.2.0

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

func (*Ballot) Reset added in v0.2.0

func (x *Ballot) Reset()

func (*Ballot) String added in v0.2.0

func (x *Ballot) String() string

type BaseRepository added in v0.2.0

type BaseRepository[M proto.Message, K Key] struct {
	// contains filtered or unexported fields
}

func (*BaseRepository[M, K]) CountPrefix added in v0.2.0

func (r *BaseRepository[M, K]) CountPrefix(prefix Prefix) (int64, error)

func (*BaseRepository[M, K]) CreateKey added in v0.2.0

func (r *BaseRepository[M, K]) CreateKey(b []byte) K

func (*BaseRepository[M, K]) Delete added in v0.2.0

func (r *BaseRepository[M, K]) Delete(obj M, txn *kv.Transaction) (err error)

func (*BaseRepository[M, K]) DeleteByKey added in v0.2.0

func (r *BaseRepository[M, K]) DeleteByKey(k K) error

func (*BaseRepository[M, K]) GetByKey added in v0.2.0

func (r *BaseRepository[M, K]) GetByKey(k K, txn *kv.Transaction) (M, error)

func (*BaseRepository[M, K]) GetKeys added in v0.2.0

func (r *BaseRepository[M, K]) GetKeys(obj M) *StructuredKey

func (*BaseRepository[M, K]) PrefixScan added in v0.2.0

func (r *BaseRepository[M, K]) PrefixScan(cursor []byte, write bool, prefix Prefix, c func(K, M, *kv.Transaction) error) error

func (*BaseRepository[M, K]) Put added in v0.2.0

func (r *BaseRepository[M, K]) Put(obj M) error

func (*BaseRepository[M, K]) ScanIndex added in v0.2.0

func (r *BaseRepository[M, K]) ScanIndex(prefix Prefix, write bool, callback func(primaryKey []byte, txn *kv.Transaction) error) error

ScanIndex scans secondary index keys where values are primary keys, not full messages

func (*BaseRepository[M, K]) Update added in v0.2.0

func (r *BaseRepository[M, K]) Update(key K, cb func(M, kv.Transaction) (M, error)) (err error)

type ClusterConfig added in v0.2.0

type ClusterConfig struct {
	ClusterVersion uint64  `protobuf:"varint,1,opt,name=clusterVersion,proto3" json:"clusterVersion,omitempty"`
	Nodes          []*Node `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
	Fn             int64   `protobuf:"varint,3,opt,name=fn,proto3" json:"fn,omitempty"`
	Fz             int64   `protobuf:"varint,4,opt,name=fz,proto3" json:"fz,omitempty"`
	// contains filtered or unexported fields
}

func (*ClusterConfig) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ClusterConfig.ProtoReflect.Descriptor instead.

func (*ClusterConfig) GetClusterVersion added in v0.2.0

func (x *ClusterConfig) GetClusterVersion() uint64

func (*ClusterConfig) GetFn added in v0.2.0

func (x *ClusterConfig) GetFn() int64

func (*ClusterConfig) GetFz added in v0.2.0

func (x *ClusterConfig) GetFz() int64

func (*ClusterConfig) GetNodes added in v0.2.0

func (x *ClusterConfig) GetNodes() []*Node

func (*ClusterConfig) ProtoMessage added in v0.2.0

func (*ClusterConfig) ProtoMessage()

func (*ClusterConfig) ProtoReflect added in v0.2.0

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

func (*ClusterConfig) Reset added in v0.2.0

func (x *ClusterConfig) Reset()

func (*ClusterConfig) String added in v0.2.0

func (x *ClusterConfig) String() string

type ConsensusClient added in v0.1.0

ConsensusClient is the client API for Consensus 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 NewConsensusClient added in v0.1.0

func NewConsensusClient(cc grpc.ClientConnInterface) ConsensusClient

func WrapWithLatency added in v0.2.0

func WrapWithLatency(client ConsensusClient, targetRegion string) ConsensusClient

WrapWithLatency wraps a ConsensusClient with latency injection.

type ConsensusServer added in v0.1.0

ConsensusServer is the server API for Consensus service. All implementations must embed UnimplementedConsensusServer for forward compatibility.

type Consensus_DeReferenceClient added in v0.2.0

type Consensus_DeReferenceClient = grpc.ServerStreamingClient[DereferenceResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_DeReferenceServer added in v0.2.0

type Consensus_DeReferenceServer = grpc.ServerStreamingServer[DereferenceResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_FollowClient added in v0.2.0

type Consensus_FollowClient = grpc.ServerStreamingClient[RecordMutation]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_FollowServer added in v0.2.0

type Consensus_FollowServer = grpc.ServerStreamingServer[RecordMutation]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_ReplicateClient added in v0.2.0

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_ReplicateServer added in v0.2.0

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_RequestSlotsClient added in v0.2.0

type Consensus_RequestSlotsClient = grpc.ServerStreamingClient[RecordMutation]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Consensus_RequestSlotsServer added in v0.2.0

type Consensus_RequestSlotsServer = grpc.ServerStreamingServer[RecordMutation]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Data added in v0.2.0

type Data struct {
	Key   []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Chunk uint64 `protobuf:"varint,3,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

func (*Data) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetChunk added in v0.2.0

func (x *Data) GetChunk() uint64

func (*Data) GetKey added in v0.2.0

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

func (*Data) GetValue added in v0.2.0

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

func (*Data) ProtoMessage added in v0.2.0

func (*Data) ProtoMessage()

func (*Data) ProtoReflect added in v0.2.0

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

func (*Data) Reset added in v0.2.0

func (x *Data) Reset()

func (*Data) String added in v0.2.0

func (x *Data) String() string

type DataKey added in v0.2.0

type DataKey struct {
	GenericKey
}

type DataR added in v0.2.0

type DataR struct {
	BaseRepository[*Data, DataKey]
}

func (*DataR) CreateKey added in v0.2.0

func (d *DataR) CreateKey(k []byte) DataKey

func (*DataR) GetKeys added in v0.2.0

func (d *DataR) GetKeys(record *Data) *StructuredKey

func (*DataR) GetPrefix added in v0.2.0

func (d *DataR) GetPrefix(reference *DataReference) Prefix

type DataReference added in v0.2.0

type DataReference struct {
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*DataReference) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DataReference.ProtoReflect.Descriptor instead.

func (*DataReference) GetAddress added in v0.2.0

func (x *DataReference) GetAddress() []byte

func (*DataReference) ProtoMessage added in v0.2.0

func (*DataReference) ProtoMessage()

func (*DataReference) ProtoReflect added in v0.2.0

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

func (*DataReference) Reset added in v0.2.0

func (x *DataReference) Reset()

func (*DataReference) String added in v0.2.0

func (x *DataReference) String() string

type DataRepository added in v0.2.0

type DataRepository interface {
	Repository[*Data, DataKey]
	GetPrefix(reference *DataReference) Prefix
}

func NewDataRepository added in v0.2.0

func NewDataRepository(ctx context.Context) DataRepository

type Deletion added in v0.2.0

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

func (*Deletion) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Deletion.ProtoReflect.Descriptor instead.

func (*Deletion) ProtoMessage added in v0.2.0

func (*Deletion) ProtoMessage()

func (*Deletion) ProtoReflect added in v0.2.0

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

func (*Deletion) Reset added in v0.2.0

func (x *Deletion) Reset()

func (*Deletion) String added in v0.2.0

func (x *Deletion) String() string

type DereferenceRequest added in v0.2.0

type DereferenceRequest struct {
	Reference *DataReference `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
	// contains filtered or unexported fields
}

func (*DereferenceRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DereferenceRequest.ProtoReflect.Descriptor instead.

func (*DereferenceRequest) GetReference added in v0.2.0

func (x *DereferenceRequest) GetReference() *DataReference

func (*DereferenceRequest) ProtoMessage added in v0.2.0

func (*DereferenceRequest) ProtoMessage()

func (*DereferenceRequest) ProtoReflect added in v0.2.0

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

func (*DereferenceRequest) Reset added in v0.2.0

func (x *DereferenceRequest) Reset()

func (*DereferenceRequest) String added in v0.2.0

func (x *DereferenceRequest) String() string

type DereferenceResponse added in v0.2.0

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

func (*DereferenceResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use DereferenceResponse.ProtoReflect.Descriptor instead.

func (*DereferenceResponse) GetData added in v0.2.0

func (x *DereferenceResponse) GetData() *Data

func (*DereferenceResponse) ProtoMessage added in v0.2.0

func (*DereferenceResponse) ProtoMessage()

func (*DereferenceResponse) ProtoReflect added in v0.2.0

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

func (*DereferenceResponse) Reset added in v0.2.0

func (x *DereferenceResponse) Reset()

func (*DereferenceResponse) String added in v0.2.0

func (x *DereferenceResponse) String() string

type GenericKey added in v0.2.0

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

func (GenericKey) Prefix added in v0.2.0

func (k GenericKey) Prefix(size int) Prefix

func (GenericKey) Raw added in v0.2.0

func (k GenericKey) Raw() []byte

type HealthChecker

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

HealthChecker monitors node health and maintains active node lists

func NewHealthChecker

func NewHealthChecker(manager *NodeConnectionManager) *HealthChecker

func NewHealthCheckerForTesting

func NewHealthCheckerForTesting(manager *NodeConnectionManager) *HealthChecker

NewHealthCheckerForTesting creates a health checker with no jitter for testing

func (*HealthChecker) GetHealthStats

func (hc *HealthChecker) GetHealthStats() *HealthStats

func (*HealthChecker) Start

func (hc *HealthChecker) Start(ctx context.Context)

Start begins the health checking routine

func (*HealthChecker) Stop

func (hc *HealthChecker) Stop()

Stop halts the health checking routine

type HealthStats

type HealthStats struct {
	TotalNodes    int64            `json:"total_nodes"`
	ActiveNodes   int64            `json:"active_nodes"`
	FailedNodes   int64            `json:"failed_nodes"`
	RegionStats   map[string]int64 `json:"region_stats"`
	AverageRTT    time.Duration    `json:"average_rtt"`
	LastCheckTime time.Time        `json:"last_check_time"`
}

GetHealthStats returns health statistics for monitoring

type KVConsensusAdapter

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

KVConsensusAdapter provides a clean interface for KV operations using the existing w-paxos consensus

func NewKVConsensusAdapter

func NewKVConsensusAdapter(server *Server, kvStore kv.Store) *KVConsensusAdapter

NewKVConsensusAdapter creates a new KV consensus adapter

func (*KVConsensusAdapter) GetKey

func (a *KVConsensusAdapter) GetKey(ctx context.Context, key string) ([]byte, error)

GetKey implements distributed GET operation with freshness checking

type Key added in v0.2.0

type Key interface {
	Raw() []byte
	Prefix(size int) Prefix
}

type LatencyConfig added in v0.2.0

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

LatencyConfig defines inter-region latency for testing purposes. This is used by integration tests to simulate realistic network conditions.

func GetLatencyConfig added in v0.2.0

func GetLatencyConfig() *LatencyConfig

GetLatencyConfig returns the global latency configuration.

func (*LatencyConfig) ApplyPreset added in v0.2.0

func (c *LatencyConfig) ApplyPreset(preset LatencyPreset)

ApplyPreset applies a predefined latency configuration.

func (*LatencyConfig) Disable added in v0.2.0

func (c *LatencyConfig) Disable()

Disable turns off latency injection.

func (*LatencyConfig) Enable added in v0.2.0

func (c *LatencyConfig) Enable(matrix map[string]time.Duration)

Enable activates latency injection with the given matrix.

func (*LatencyConfig) EnableDefault added in v0.2.0

func (c *LatencyConfig) EnableDefault()

EnableDefault activates latency injection with default realistic values.

func (*LatencyConfig) GetLatency added in v0.2.0

func (c *LatencyConfig) GetLatency(fromRegion, toRegion string) time.Duration

GetLatency returns the one-way latency between two regions.

func (*LatencyConfig) IsEnabled added in v0.2.0

func (c *LatencyConfig) IsEnabled() bool

IsEnabled returns whether latency injection is active.

func (*LatencyConfig) SetJitter added in v0.2.0

func (c *LatencyConfig) SetJitter(percent int)

SetJitter sets the jitter percentage (0-100).

func (*LatencyConfig) SetLatency added in v0.2.0

func (c *LatencyConfig) SetLatency(fromRegion, toRegion string, latency time.Duration)

SetLatency sets custom latency between two regions.

type LatencyPreset added in v0.2.0

type LatencyPreset string

LatencyPreset defines common testing scenarios.

const (
	// PresetLocal simulates local/same-datacenter deployment (1-2ms)
	PresetLocal LatencyPreset = "local"
	// PresetSingleContinent simulates nodes within one continent (~20-70ms)
	PresetSingleContinent LatencyPreset = "single-continent"
	// PresetGlobal simulates worldwide deployment (~50-200ms)
	PresetGlobal LatencyPreset = "global"
	// PresetHighLatency simulates extreme conditions (~200-500ms)
	PresetHighLatency LatencyPreset = "high-latency"
)

type LatencyStats added in v0.2.0

type LatencyStats struct {
	TotalCalls     atomic.Int64
	TotalLatencyNs atomic.Int64
	MinLatencyNs   atomic.Int64
	MaxLatencyNs   atomic.Int64
}

LatencyStats tracks latency injection statistics for benchmarking.

func GetLatencyStats added in v0.2.0

func GetLatencyStats() *LatencyStats

GetLatencyStats returns the global latency statistics.

func (*LatencyStats) AverageLatency added in v0.2.0

func (s *LatencyStats) AverageLatency() time.Duration

AverageLatency returns the average injected latency.

func (*LatencyStats) Reset added in v0.2.0

func (s *LatencyStats) Reset()

Reset clears all latency statistics.

type ManagedNode

type ManagedNode struct {
	*Node
	// contains filtered or unexported fields
}

ManagedNode represents a node with its connection state

func (*ManagedNode) AddRTTMeasurement

func (m *ManagedNode) AddRTTMeasurement(rtt time.Duration)

func (*ManagedNode) Close

func (m *ManagedNode) Close()

func (*ManagedNode) GetAverageRTT

func (m *ManagedNode) GetAverageRTT() time.Duration

func (*ManagedNode) GetFailures

func (m *ManagedNode) GetFailures() int64

func (*ManagedNode) GetStatus

func (m *ManagedNode) GetStatus() NodeStatus

func (*ManagedNode) UpdateStatus

func (m *ManagedNode) UpdateStatus(status NodeStatus)

type Node added in v0.1.0

type Node struct {
	Id      uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`          // The ID of the node
	Address string               `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // The address of the node
	Region  *Region              `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`   // The region the node is in
	Port    int64                `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`      // The port the node listens on
	Active  bool                 `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"`  // Whether the node is active
	Rtt     *durationpb.Duration `protobuf:"bytes,6,opt,name=rtt,proto3" json:"rtt,omitempty"`         // The round trip time to the node
	// contains filtered or unexported fields
}

message MigrationVersion { int64 tableVersion = 1; // The version of the table int64 migrationVersion = 2; // The version of the migration int64 nodeId = 3; // The ID of the node string tableName = 4; // The name of the table }

message GossipMigration { Migration migrationRequest = 1; // The migration to be gossiped Table table = 2; // The table the migration is for MigrationVersion previousMigration = 3; // The previous migration int64 ttl = 4; // The time to live of the gossip Node sender = 5; // The node sending the gossip }

message JoinClusterResponse { bool success = 1; // Whether the operation was successful Table table = 2; // The current node table if the requested node is not the owner int64 nodeId = 3; // The ID of the newly joined node }

message SchemaMigration { repeated string commands = 1; // The commands to be executed }

message ACL { ACLData owners = 1; ACLData readers = 2; ACLData writers = 3; }

message DataReference { bytes key = 1; bytes checksum = 2; }

message Record { oneof data { RawData value = 1; DataReference ref = 3; } ACL accessControl = 2; }

message RawData { bytes data = 1; }

message SetChange { bytes key = 1; Record data = 2; }

message AclChange { bytes key = 1; oneof change { ACL addition = 2; ACL deletion = 3; } }

message DelChange { bytes key = 1; }

message KVChange { oneof operation { SetChange set = 1; DelChange del = 2; RawData data = 3; AclChange acl = 4; } }

message DataMigration { google.protobuf.Timestamp time = 3; oneof session { KVChange change = 2; } }

message NilMigration {}

message Migration { MigrationVersion version = 1; // The version of the migration oneof migration { SchemaMigration schema = 2; // The schema migration DataMigration data = 3; // The data migration NilMigration none = 4; // Represents a read } }

message WriteMigrationRequest { Node sender = 1; // The node sending the migration Migration migration = 2; // The migration to be written }

message WriteMigrationResponse { bool success = 1; // Whether the operation was successful Table table = 2; // The table if the operation was not successful }

enum ReplicationLevel { global = 0; // Replicate the table globally regional = 1; // Replicate the table within the region local = 2; // Replicate the table within the node }

enum TableType { table = 0; // The table is a regular table group = 1; // The table is a group meta table trigger = 2; // The table is a trigger view = 3; // The table is a view sharded = 4; // The table is sharded }

message Principal { string name = 1; // The name of the principal string value = 2; // The value of the principal }

message Shard { Table table = 1; // The table the shard belongs to Table shard = 2; // The shard table repeated Principal principals = 3; // The principals the shard is sharded by }

message Table { string name = 1; // The name of the table ReplicationLevel replicationLevel = 2; // The replication level of the table Node owner = 3; // The global owner of the table google.protobuf.Timestamp createdAt = 4; // The time the table was created int64 version = 5; // The version of the table repeated string allowedRegions = 6; // The regions the table data can be replicated to repeated string restrictedRegions = 7; // The regions the table data cannot be replicated to string group = 9; // The group the table belongs to TableType type = 10; // The type of the table repeated string shardPrincipals = 11; // The principals the table is sharded by }

message TableGroup { Table details = 1; // The details of the group repeated Table tables = 2; // The tables in the group }

message StealTableOwnershipFailure { Table table = 1; // The table that was not stolen }

message StealTableOwnershipSuccess { Table table = 1; // The table that was stolen repeated Migration missingMigrations = 2; // The missing migrations, if any }

enum StealReason { queryReason = 0; // The table was stolen due to a readonly writeReason = 1; // The table was stolen due to a write discoveryReason = 2; // We only care about this for discovery }

message StealTableOwnershipRequest { Node sender = 1; // The node sending the request StealReason reason = 4; // The reason the table was stolen Table table = 2; // The table to be stolen }

message StealTableOwnershipResponse { bool promised = 1; // Whether the operation was successful oneof response { StealTableOwnershipFailure failure = 2; // The table that was not stolen StealTableOwnershipSuccess success = 3; // The table that was stolen } }

func (*Node) Descriptor deprecated added in v0.1.0

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

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetActive added in v0.1.0

func (x *Node) GetActive() bool

func (*Node) GetAddress added in v0.1.0

func (x *Node) GetAddress() string

func (*Node) GetId added in v0.1.0

func (x *Node) GetId() uint64

func (*Node) GetPort added in v0.1.0

func (x *Node) GetPort() int64

func (*Node) GetRegion added in v0.1.0

func (x *Node) GetRegion() *Region

func (*Node) GetRtt added in v0.1.0

func (x *Node) GetRtt() *durationpb.Duration

func (*Node) ProtoMessage added in v0.1.0

func (*Node) ProtoMessage()

func (*Node) ProtoReflect added in v0.1.0

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

func (*Node) Reset added in v0.1.0

func (x *Node) Reset()

func (*Node) String added in v0.1.0

func (x *Node) String() string

type NodeConnectionManager

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

NodeConnectionManager centralizes all node connection management

func GetNodeConnectionManager

func GetNodeConnectionManager(ctx context.Context) *NodeConnectionManager

GetNodeConnectionManager returns the singleton NodeConnectionManager instance

func (*NodeConnectionManager) AddNode

func (ncm *NodeConnectionManager) AddNode(ctx context.Context, node *Node) error

AddNode registers a new node and attempts connection

func (*NodeConnectionManager) ExecuteOnNode

func (ncm *NodeConnectionManager) ExecuteOnNode(nodeID uint64, operation func(ConsensusClient) error) error

ExecuteOnNode executes a consensus operation on a specific node

func (*NodeConnectionManager) GetActiveNodesByRegion

func (ncm *NodeConnectionManager) GetActiveNodesByRegion(region string) []*ManagedNode

GetActiveNodesByRegion returns currently reachable nodes in a region

func (*NodeConnectionManager) GetAllActiveNodes

func (ncm *NodeConnectionManager) GetAllActiveNodes() map[string][]*ManagedNode

GetAllActiveNodes returns all currently reachable nodes

func (*NodeConnectionManager) Shutdown

func (ncm *NodeConnectionManager) Shutdown()

Shutdown gracefully closes all connections and stops background processes

type NodeStatus

type NodeStatus int
const (
	NodeStatusUnknown NodeStatus = iota
	NodeStatusConnecting
	NodeStatusActive
	NodeStatusFailed
	NodeStatusRemoved
)

type Noop added in v0.2.0

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

func (*Noop) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Noop.ProtoReflect.Descriptor instead.

func (*Noop) ProtoMessage added in v0.2.0

func (*Noop) ProtoMessage()

func (*Noop) ProtoReflect added in v0.2.0

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

func (*Noop) Reset added in v0.2.0

func (x *Noop) Reset()

func (*Noop) String added in v0.2.0

func (x *Noop) String() string

type OwnershipState added in v0.2.0

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

type OwnershipTracking added in v0.2.0

type OwnershipTracking struct {
	Promised         *Ballot `protobuf:"bytes,1,opt,name=promised,proto3" json:"promised,omitempty"`                  // highest ballot promised
	Owned            bool    `protobuf:"varint,2,opt,name=owned,proto3" json:"owned,omitempty"`                       // am I the owner of this?
	NextSlot         uint64  `protobuf:"varint,3,opt,name=nextSlot,proto3" json:"nextSlot,omitempty"`                 // slot to assign next
	MaxAcceptedSlot  uint64  `protobuf:"varint,4,opt,name=maxAcceptedSlot,proto3" json:"maxAcceptedSlot,omitempty"`   // highest slot with an accepted value
	MaxCommittedSlot uint64  `protobuf:"varint,5,opt,name=maxCommittedSlot,proto3" json:"maxCommittedSlot,omitempty"` // highest slot marked committed
	// contains filtered or unexported fields
}

func (*OwnershipTracking) Descriptor deprecated added in v0.2.0

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

Deprecated: Use OwnershipTracking.ProtoReflect.Descriptor instead.

func (*OwnershipTracking) GetMaxAcceptedSlot added in v0.2.0

func (x *OwnershipTracking) GetMaxAcceptedSlot() uint64

func (*OwnershipTracking) GetMaxCommittedSlot added in v0.2.0

func (x *OwnershipTracking) GetMaxCommittedSlot() uint64

func (*OwnershipTracking) GetNextSlot added in v0.2.0

func (x *OwnershipTracking) GetNextSlot() uint64

func (*OwnershipTracking) GetOwned added in v0.2.0

func (x *OwnershipTracking) GetOwned() bool

func (*OwnershipTracking) GetPromised added in v0.2.0

func (x *OwnershipTracking) GetPromised() *Ballot

func (*OwnershipTracking) ProtoMessage added in v0.2.0

func (*OwnershipTracking) ProtoMessage()

func (*OwnershipTracking) ProtoReflect added in v0.2.0

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

func (*OwnershipTracking) Reset added in v0.2.0

func (x *OwnershipTracking) Reset()

func (*OwnershipTracking) String added in v0.2.0

func (x *OwnershipTracking) String() string

type PingRequest added in v0.1.0

type PingRequest struct {
	SenderNodeId uint64                 `protobuf:"varint,1,opt,name=sender_node_id,json=senderNodeId,proto3" json:"sender_node_id,omitempty"` // The ID of the node sending the ping
	Timestamp    *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                              // Timestamp of the ping
	// contains filtered or unexported fields
}

Ping messages for health checks

func (*PingRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) GetSenderNodeId added in v0.1.0

func (x *PingRequest) GetSenderNodeId() uint64

func (*PingRequest) GetTimestamp added in v0.1.0

func (x *PingRequest) GetTimestamp() *timestamppb.Timestamp

func (*PingRequest) ProtoMessage added in v0.1.0

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect added in v0.1.0

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

func (*PingRequest) Reset added in v0.1.0

func (x *PingRequest) Reset()

func (*PingRequest) String added in v0.1.0

func (x *PingRequest) String() string

type PingResponse added in v0.1.0

type PingResponse struct {
	Success         bool                   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`                                          // Whether the ping was successful
	ResponderNodeId uint64                 `protobuf:"varint,2,opt,name=responder_node_id,json=responderNodeId,proto3" json:"responder_node_id,omitempty"` // The ID of the node responding
	Timestamp       *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`                                       // Timestamp of the response
	// contains filtered or unexported fields
}

func (*PingResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use PingResponse.ProtoReflect.Descriptor instead.

func (*PingResponse) GetResponderNodeId added in v0.1.0

func (x *PingResponse) GetResponderNodeId() uint64

func (*PingResponse) GetSuccess added in v0.1.0

func (x *PingResponse) GetSuccess() bool

func (*PingResponse) GetTimestamp added in v0.1.0

func (x *PingResponse) GetTimestamp() *timestamppb.Timestamp

func (*PingResponse) ProtoMessage added in v0.1.0

func (*PingResponse) ProtoMessage()

func (*PingResponse) ProtoReflect added in v0.1.0

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

func (*PingResponse) Reset added in v0.1.0

func (x *PingResponse) Reset()

func (*PingResponse) String added in v0.1.0

func (x *PingResponse) String() string

type Prefix added in v0.2.0

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

type PrefixScanRequest added in v0.1.0

type PrefixScanRequest struct {
	Sender *Node  `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Prefix []byte `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// contains filtered or unexported fields
}

Remote prefix scan

func (*PrefixScanRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use PrefixScanRequest.ProtoReflect.Descriptor instead.

func (*PrefixScanRequest) GetPrefix added in v0.2.0

func (x *PrefixScanRequest) GetPrefix() []byte

func (*PrefixScanRequest) GetSender added in v0.1.0

func (x *PrefixScanRequest) GetSender() *Node

func (*PrefixScanRequest) ProtoMessage added in v0.1.0

func (*PrefixScanRequest) ProtoMessage()

func (*PrefixScanRequest) ProtoReflect added in v0.1.0

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

func (*PrefixScanRequest) Reset added in v0.1.0

func (x *PrefixScanRequest) Reset()

func (*PrefixScanRequest) String added in v0.1.0

func (x *PrefixScanRequest) String() string

type PrefixScanResponse added in v0.1.0

type PrefixScanResponse struct {
	Success bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Keys    [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*PrefixScanResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use PrefixScanResponse.ProtoReflect.Descriptor instead.

func (*PrefixScanResponse) GetKeys added in v0.1.0

func (x *PrefixScanResponse) GetKeys() [][]byte

func (*PrefixScanResponse) GetSuccess added in v0.1.0

func (x *PrefixScanResponse) GetSuccess() bool

func (*PrefixScanResponse) ProtoMessage added in v0.1.0

func (*PrefixScanResponse) ProtoMessage()

func (*PrefixScanResponse) ProtoReflect added in v0.1.0

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

func (*PrefixScanResponse) Reset added in v0.1.0

func (x *PrefixScanResponse) Reset()

func (*PrefixScanResponse) String added in v0.1.0

func (x *PrefixScanResponse) String() string

type Principal added in v0.1.0

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

func (*Principal) Descriptor deprecated added in v0.1.0

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

Deprecated: Use Principal.ProtoReflect.Descriptor instead.

func (*Principal) GetName added in v0.1.0

func (x *Principal) GetName() string

func (*Principal) GetValue added in v0.1.0

func (x *Principal) GetValue() string

func (*Principal) ProtoMessage added in v0.1.0

func (*Principal) ProtoMessage()

func (*Principal) ProtoReflect added in v0.1.0

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

func (*Principal) Reset added in v0.1.0

func (x *Principal) Reset()

func (*Principal) String added in v0.1.0

func (x *Principal) String() string

type Quorum

type Quorum interface {
	ConsensusClient
	FriendlySteal(ctx context.Context, key []byte) (bool, *Ballot, error)
}

type QuorumManager

type QuorumManager interface {
	GetQuorum(ctx context.Context, table string) (Quorum, error)
	GetBroadcastQuorum(ctx context.Context, table []byte) (Quorum, error)
	AddNode(ctx context.Context, node *Node) error
	RemoveNode(nodeID uint64) error
	Send(node *Node, do func(quorumNode *QuorumNode) (any, error)) (any, error)
}

func GetDefaultQuorumManager

func GetDefaultQuorumManager(ctx context.Context) QuorumManager

type QuorumNode

type QuorumNode struct {
	*Node
	// contains filtered or unexported fields
}

func (*QuorumNode) AcceptMigration

func (q *QuorumNode) AcceptMigration(ctx context.Context, in *WriteMigrationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)

func (*QuorumNode) Close

func (q *QuorumNode) Close()

func (*QuorumNode) DeReference added in v0.2.0

func (*QuorumNode) Follow added in v0.2.0

func (*QuorumNode) Ping

func (q *QuorumNode) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)

func (*QuorumNode) PrefixScan added in v0.1.0

func (q *QuorumNode) PrefixScan(ctx context.Context, in *PrefixScanRequest, opts ...grpc.CallOption) (*PrefixScanResponse, error)

func (*QuorumNode) ReadRecord added in v0.2.0

func (q *QuorumNode) ReadRecord(ctx context.Context, in *ReadRecordRequest, opts ...grpc.CallOption) (*ReadRecordResponse, error)

func (*QuorumNode) Replicate added in v0.2.0

func (*QuorumNode) RequestSlots added in v0.2.0

func (*QuorumNode) StealTableOwnership

func (*QuorumNode) WriteMigration

type ReadKeyRequest added in v0.1.0

type ReadKeyRequest struct {
	Sender    *Node  `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`        // The node requesting the read
	Key       []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`              // The key to read
	Watermark uint64 `protobuf:"varint,3,opt,name=watermark,proto3" json:"watermark,omitempty"` // The watermark for read consistency
	// contains filtered or unexported fields
}

Remote read messages for leader-based reads

func (*ReadKeyRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use ReadKeyRequest.ProtoReflect.Descriptor instead.

func (*ReadKeyRequest) GetKey added in v0.1.0

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

func (*ReadKeyRequest) GetSender added in v0.1.0

func (x *ReadKeyRequest) GetSender() *Node

func (*ReadKeyRequest) GetWatermark added in v0.2.0

func (x *ReadKeyRequest) GetWatermark() uint64

func (*ReadKeyRequest) ProtoMessage added in v0.1.0

func (*ReadKeyRequest) ProtoMessage()

func (*ReadKeyRequest) ProtoReflect added in v0.1.0

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

func (*ReadKeyRequest) Reset added in v0.1.0

func (x *ReadKeyRequest) Reset()

func (*ReadKeyRequest) String added in v0.1.0

func (x *ReadKeyRequest) String() string

type ReadKeyResponse added in v0.1.0

type ReadKeyResponse struct {
	Success bool           `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Whether the read was successful
	Value   *DataReference `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`      // The value if found, empty if not found
	// contains filtered or unexported fields
}

func (*ReadKeyResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use ReadKeyResponse.ProtoReflect.Descriptor instead.

func (*ReadKeyResponse) GetSuccess added in v0.1.0

func (x *ReadKeyResponse) GetSuccess() bool

func (*ReadKeyResponse) GetValue added in v0.1.0

func (x *ReadKeyResponse) GetValue() *DataReference

func (*ReadKeyResponse) ProtoMessage added in v0.1.0

func (*ReadKeyResponse) ProtoMessage()

func (*ReadKeyResponse) ProtoReflect added in v0.1.0

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

func (*ReadKeyResponse) Reset added in v0.1.0

func (x *ReadKeyResponse) Reset()

func (*ReadKeyResponse) String added in v0.1.0

func (x *ReadKeyResponse) String() string

type ReadRecordRequest added in v0.2.0

type ReadRecordRequest struct {
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // The key to read
	// contains filtered or unexported fields
}

Read Record from leader (returns full Record with ACL, DataReference, etc.)

func (*ReadRecordRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ReadRecordRequest.ProtoReflect.Descriptor instead.

func (*ReadRecordRequest) GetKey added in v0.2.0

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

func (*ReadRecordRequest) ProtoMessage added in v0.2.0

func (*ReadRecordRequest) ProtoMessage()

func (*ReadRecordRequest) ProtoReflect added in v0.2.0

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

func (*ReadRecordRequest) Reset added in v0.2.0

func (x *ReadRecordRequest) Reset()

func (*ReadRecordRequest) String added in v0.2.0

func (x *ReadRecordRequest) String() string

type ReadRecordResponse added in v0.2.0

type ReadRecordResponse struct {
	Success bool    `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Whether the read was successful
	Record  *Record `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"`    // The full Record if found
	// contains filtered or unexported fields
}

func (*ReadRecordResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ReadRecordResponse.ProtoReflect.Descriptor instead.

func (*ReadRecordResponse) GetRecord added in v0.2.0

func (x *ReadRecordResponse) GetRecord() *Record

func (*ReadRecordResponse) GetSuccess added in v0.2.0

func (x *ReadRecordResponse) GetSuccess() bool

func (*ReadRecordResponse) ProtoMessage added in v0.2.0

func (*ReadRecordResponse) ProtoMessage()

func (*ReadRecordResponse) ProtoReflect added in v0.2.0

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

func (*ReadRecordResponse) Reset added in v0.2.0

func (x *ReadRecordResponse) Reset()

func (*ReadRecordResponse) String added in v0.2.0

func (x *ReadRecordResponse) String() string

type Record added in v0.1.0

type Record struct {
	MaxSlot    uint64         `protobuf:"varint,4,opt,name=maxSlot,proto3" json:"maxSlot,omitempty"`
	Acl        *Acl           `protobuf:"bytes,2,opt,name=acl,proto3" json:"acl,omitempty"`
	Data       *DataReference `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	BaseRecord *Record        `protobuf:"bytes,5,opt,name=baseRecord,proto3" json:"baseRecord,omitempty"`
	// contains filtered or unexported fields
}

func ReadKey added in v0.2.0

func ReadKey(ctx context.Context, key []byte) (*Record, error)

ReadKey reads a key from the consensus layer. It returns the current Record for the key, which contains: - DataReference (CAS address to the actual value) - ACL information

Without watermarks, reads must go through the current owner/leader. This function: 1. Checks if we own the key (fast path - read locally) 2. If not, performs Phase-1 discovery with <0,0> ballot to find leader 3. If we're the leader, read locally 4. Otherwise, steals ownership and reads (ensures linearizability)

func (*Record) Descriptor deprecated added in v0.1.0

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

Deprecated: Use Record.ProtoReflect.Descriptor instead.

func (*Record) GetAcl added in v0.2.0

func (x *Record) GetAcl() *Acl

func (*Record) GetBaseRecord added in v0.2.0

func (x *Record) GetBaseRecord() *Record

func (*Record) GetData added in v0.2.0

func (x *Record) GetData() *DataReference

func (*Record) GetMaxSlot added in v0.2.0

func (x *Record) GetMaxSlot() uint64

func (*Record) ProtoMessage added in v0.1.0

func (*Record) ProtoMessage()

func (*Record) ProtoReflect added in v0.1.0

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

func (*Record) Reset added in v0.1.0

func (x *Record) Reset()

func (*Record) String added in v0.1.0

func (x *Record) String() string

type RecordMutation added in v0.2.0

type RecordMutation struct {
	Slot   *Slot   `protobuf:"bytes,1,opt,name=slot,proto3" json:"slot,omitempty"`
	Ballot *Ballot `protobuf:"bytes,8,opt,name=ballot,proto3" json:"ballot,omitempty"`
	// Types that are valid to be assigned to Message:
	//
	//	*RecordMutation_ValueAddress
	//	*RecordMutation_Tombstone
	//	*RecordMutation_Compaction
	//	*RecordMutation_Noop
	//	*RecordMutation_Config
	//	*RecordMutation_AddPrincipal
	//	*RecordMutation_RemovePrincipal
	Message   isRecordMutation_Message `protobuf_oneof:"message"`
	Committed bool                     `protobuf:"varint,7,opt,name=committed,proto3" json:"committed,omitempty"`
	// contains filtered or unexported fields
}

func (*RecordMutation) Descriptor deprecated added in v0.2.0

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

Deprecated: Use RecordMutation.ProtoReflect.Descriptor instead.

func (*RecordMutation) GetAddPrincipal added in v0.2.0

func (x *RecordMutation) GetAddPrincipal() *AddPrincipal

func (*RecordMutation) GetBallot added in v0.2.0

func (x *RecordMutation) GetBallot() *Ballot

func (*RecordMutation) GetCommitted added in v0.2.0

func (x *RecordMutation) GetCommitted() bool

func (*RecordMutation) GetCompaction added in v0.2.0

func (x *RecordMutation) GetCompaction() *Record

func (*RecordMutation) GetConfig added in v0.2.0

func (x *RecordMutation) GetConfig() *ClusterConfig

func (*RecordMutation) GetMessage added in v0.2.0

func (x *RecordMutation) GetMessage() isRecordMutation_Message

func (*RecordMutation) GetNoop added in v0.2.0

func (x *RecordMutation) GetNoop() *Noop

func (*RecordMutation) GetRemovePrincipal added in v0.2.0

func (x *RecordMutation) GetRemovePrincipal() *RemovePrincipal

func (*RecordMutation) GetSlot added in v0.2.0

func (x *RecordMutation) GetSlot() *Slot

func (*RecordMutation) GetTombstone added in v0.2.0

func (x *RecordMutation) GetTombstone() *Deletion

func (*RecordMutation) GetValueAddress added in v0.2.0

func (x *RecordMutation) GetValueAddress() *DataReference

func (*RecordMutation) ProtoMessage added in v0.2.0

func (*RecordMutation) ProtoMessage()

func (*RecordMutation) ProtoReflect added in v0.2.0

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

func (*RecordMutation) Reset added in v0.2.0

func (x *RecordMutation) Reset()

func (*RecordMutation) String added in v0.2.0

func (x *RecordMutation) String() string

type RecordMutation_AddPrincipal added in v0.2.0

type RecordMutation_AddPrincipal struct {
	AddPrincipal *AddPrincipal `protobuf:"bytes,10,opt,name=addPrincipal,proto3,oneof"`
}

type RecordMutation_Compaction added in v0.2.0

type RecordMutation_Compaction struct {
	Compaction *Record `protobuf:"bytes,5,opt,name=compaction,proto3,oneof"`
}

type RecordMutation_Config added in v0.2.0

type RecordMutation_Config struct {
	Config *ClusterConfig `protobuf:"bytes,9,opt,name=config,proto3,oneof"`
}

type RecordMutation_Noop added in v0.2.0

type RecordMutation_Noop struct {
	Noop *Noop `protobuf:"bytes,6,opt,name=noop,proto3,oneof"`
}

type RecordMutation_RemovePrincipal added in v0.2.0

type RecordMutation_RemovePrincipal struct {
	RemovePrincipal *RemovePrincipal `protobuf:"bytes,11,opt,name=removePrincipal,proto3,oneof"`
}

type RecordMutation_Tombstone added in v0.2.0

type RecordMutation_Tombstone struct {
	Tombstone *Deletion `protobuf:"bytes,3,opt,name=tombstone,proto3,oneof"`
}

type RecordMutation_ValueAddress added in v0.2.0

type RecordMutation_ValueAddress struct {
	ValueAddress *DataReference `protobuf:"bytes,2,opt,name=valueAddress,proto3,oneof"`
}

type Region added in v0.1.0

type Region struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The region name
	// contains filtered or unexported fields
}

func (*Region) Descriptor deprecated added in v0.1.0

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

Deprecated: Use Region.ProtoReflect.Descriptor instead.

func (*Region) GetName added in v0.1.0

func (x *Region) GetName() string

func (*Region) ProtoMessage added in v0.1.0

func (*Region) ProtoMessage()

func (*Region) ProtoReflect added in v0.1.0

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

func (*Region) Reset added in v0.1.0

func (x *Region) Reset()

func (*Region) String added in v0.1.0

func (x *Region) String() string

type RegionName

type RegionName string

type RemovePrincipal added in v0.2.0

type RemovePrincipal struct {
	Role      AclRole    `protobuf:"varint,1,opt,name=role,proto3,enum=atlas.consensus.AclRole" json:"role,omitempty"`
	Principal *Principal `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
	// contains filtered or unexported fields
}

func (*RemovePrincipal) Descriptor deprecated added in v0.2.0

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

Deprecated: Use RemovePrincipal.ProtoReflect.Descriptor instead.

func (*RemovePrincipal) GetPrincipal added in v0.2.0

func (x *RemovePrincipal) GetPrincipal() *Principal

func (*RemovePrincipal) GetRole added in v0.2.0

func (x *RemovePrincipal) GetRole() AclRole

func (*RemovePrincipal) ProtoMessage added in v0.2.0

func (*RemovePrincipal) ProtoMessage()

func (*RemovePrincipal) ProtoReflect added in v0.2.0

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

func (*RemovePrincipal) Reset added in v0.2.0

func (x *RemovePrincipal) Reset()

func (*RemovePrincipal) String added in v0.2.0

func (x *RemovePrincipal) String() string

type ReplicationRequest added in v0.2.0

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

func (*ReplicationRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ReplicationRequest.ProtoReflect.Descriptor instead.

func (*ReplicationRequest) GetData added in v0.2.0

func (x *ReplicationRequest) GetData() *Data

func (*ReplicationRequest) ProtoMessage added in v0.2.0

func (*ReplicationRequest) ProtoMessage()

func (*ReplicationRequest) ProtoReflect added in v0.2.0

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

func (*ReplicationRequest) Reset added in v0.2.0

func (x *ReplicationRequest) Reset()

func (*ReplicationRequest) String added in v0.2.0

func (x *ReplicationRequest) String() string

type ReplicationResponse added in v0.2.0

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

func (*ReplicationResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use ReplicationResponse.ProtoReflect.Descriptor instead.

func (*ReplicationResponse) GetCommitted added in v0.2.0

func (x *ReplicationResponse) GetCommitted() bool

func (*ReplicationResponse) ProtoMessage added in v0.2.0

func (*ReplicationResponse) ProtoMessage()

func (*ReplicationResponse) ProtoReflect added in v0.2.0

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

func (*ReplicationResponse) Reset added in v0.2.0

func (x *ReplicationResponse) Reset()

func (*ReplicationResponse) String added in v0.2.0

func (x *ReplicationResponse) String() string

type Repository added in v0.2.0

type Repository[M proto.Message, K Key] interface {
	GetByKey(k K, txn *kv.Transaction) (M, error)
	GetKeys(obj M) *StructuredKey
	CreateKey(b []byte) K
	Put(obj M) error
	Delete(obj M, txn *kv.Transaction) error
	DeleteByKey(k K) error
	PrefixScan(cursor []byte, write bool, prefix Prefix, c func(K, M, *kv.Transaction) error) error
	ScanIndex(prefix Prefix, write bool, callback func(primaryKey []byte, txn *kv.Transaction) error) error
}

type Server

type Server struct {
	UnimplementedConsensusServer
}

func NewServer added in v0.1.0

func NewServer() *Server

func (*Server) AcceptMigration

func (s *Server) AcceptMigration(ctx context.Context, req *WriteMigrationRequest) (*emptypb.Empty, error)

func (*Server) DeReference added in v0.2.0

func (*Server) Follow added in v0.2.0

func (*Server) Ping

func (s *Server) Ping(ctx context.Context, req *PingRequest) (*PingResponse, error)

Ping implements a simple health check endpoint

func (*Server) PrefixScan added in v0.1.0

func (s *Server) PrefixScan(ctx context.Context, req *PrefixScanRequest) (*PrefixScanResponse, error)

func (*Server) ReadRecord added in v0.2.0

func (s *Server) ReadRecord(ctx context.Context, req *ReadRecordRequest) (*ReadRecordResponse, error)

func (*Server) Replicate added in v0.2.0

func (*Server) RequestSlots added in v0.2.0

func (s *Server) RequestSlots(req *SlotRequest, stream grpc.ServerStreamingServer[RecordMutation]) error

func (*Server) StealTableOwnership

func (s *Server) StealTableOwnership(ctx context.Context, req *StealTableOwnershipRequest) (*StealTableOwnershipResponse, error)

func (*Server) WriteMigration

func (s *Server) WriteMigration(ctx context.Context, req *WriteMigrationRequest) (*WriteMigrationResponse, error)

type Slot added in v0.2.0

type Slot struct {
	Key  []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Id   uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	Node uint64 `protobuf:"varint,3,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*Slot) Descriptor deprecated added in v0.2.0

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

Deprecated: Use Slot.ProtoReflect.Descriptor instead.

func (*Slot) GetId added in v0.2.0

func (x *Slot) GetId() uint64

func (*Slot) GetKey added in v0.2.0

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

func (*Slot) GetNode added in v0.2.0

func (x *Slot) GetNode() uint64

func (*Slot) ProtoMessage added in v0.2.0

func (*Slot) ProtoMessage()

func (*Slot) ProtoReflect added in v0.2.0

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

func (*Slot) Reset added in v0.2.0

func (x *Slot) Reset()

func (*Slot) String added in v0.2.0

func (x *Slot) String() string

type SlotRequest added in v0.2.0

type SlotRequest struct {
	Key            []byte   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	StartSlot      uint64   `protobuf:"varint,2,opt,name=startSlot,proto3" json:"startSlot,omitempty"`
	EndSlot        uint64   `protobuf:"varint,3,opt,name=endSlot,proto3" json:"endSlot,omitempty"`
	RequestedSlots []uint64 `protobuf:"varint,4,rep,packed,name=requestedSlots,proto3" json:"requestedSlots,omitempty"`
	// contains filtered or unexported fields
}

func (*SlotRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use SlotRequest.ProtoReflect.Descriptor instead.

func (*SlotRequest) GetEndSlot added in v0.2.0

func (x *SlotRequest) GetEndSlot() uint64

func (*SlotRequest) GetKey added in v0.2.0

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

func (*SlotRequest) GetRequestedSlots added in v0.2.0

func (x *SlotRequest) GetRequestedSlots() []uint64

func (*SlotRequest) GetStartSlot added in v0.2.0

func (x *SlotRequest) GetStartSlot() uint64

func (*SlotRequest) ProtoMessage added in v0.2.0

func (*SlotRequest) ProtoMessage()

func (*SlotRequest) ProtoReflect added in v0.2.0

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

func (*SlotRequest) Reset added in v0.2.0

func (x *SlotRequest) Reset()

func (*SlotRequest) String added in v0.2.0

func (x *SlotRequest) String() string

type StealTableOwnershipRequest added in v0.1.0

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

ownership messages

func (*StealTableOwnershipRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use StealTableOwnershipRequest.ProtoReflect.Descriptor instead.

func (*StealTableOwnershipRequest) GetBallot added in v0.2.0

func (x *StealTableOwnershipRequest) GetBallot() *Ballot

func (*StealTableOwnershipRequest) ProtoMessage added in v0.1.0

func (*StealTableOwnershipRequest) ProtoMessage()

func (*StealTableOwnershipRequest) ProtoReflect added in v0.1.0

func (*StealTableOwnershipRequest) Reset added in v0.1.0

func (x *StealTableOwnershipRequest) Reset()

func (*StealTableOwnershipRequest) String added in v0.1.0

func (x *StealTableOwnershipRequest) String() string

type StealTableOwnershipResponse added in v0.1.0

type StealTableOwnershipResponse struct {
	Promised       bool              `protobuf:"varint,1,opt,name=promised,proto3" json:"promised,omitempty"`
	MissingRecords []*RecordMutation `protobuf:"bytes,2,rep,name=missingRecords,proto3" json:"missingRecords,omitempty"`
	HighestBallot  *Ballot           `protobuf:"bytes,3,opt,name=highestBallot,proto3" json:"highestBallot,omitempty"`
	HighestSlot    *Slot             `protobuf:"bytes,4,opt,name=highestSlot,proto3" json:"highestSlot,omitempty"`
	// contains filtered or unexported fields
}

func (*StealTableOwnershipResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use StealTableOwnershipResponse.ProtoReflect.Descriptor instead.

func (*StealTableOwnershipResponse) GetHighestBallot added in v0.2.0

func (x *StealTableOwnershipResponse) GetHighestBallot() *Ballot

func (*StealTableOwnershipResponse) GetHighestSlot added in v0.2.0

func (x *StealTableOwnershipResponse) GetHighestSlot() *Slot

func (*StealTableOwnershipResponse) GetMissingRecords added in v0.2.0

func (x *StealTableOwnershipResponse) GetMissingRecords() []*RecordMutation

func (*StealTableOwnershipResponse) GetPromised added in v0.1.0

func (x *StealTableOwnershipResponse) GetPromised() bool

func (*StealTableOwnershipResponse) ProtoMessage added in v0.1.0

func (*StealTableOwnershipResponse) ProtoMessage()

func (*StealTableOwnershipResponse) ProtoReflect added in v0.1.0

func (*StealTableOwnershipResponse) Reset added in v0.1.0

func (x *StealTableOwnershipResponse) Reset()

func (*StealTableOwnershipResponse) String added in v0.1.0

func (x *StealTableOwnershipResponse) String() string

type StructuredKey added in v0.2.0

type StructuredKey struct {
	PrimaryKey      []byte
	IndexKeys       [][]byte
	RemoveIndexKeys [][]byte
}

type UnimplementedConsensusServer added in v0.1.0

type UnimplementedConsensusServer struct{}

UnimplementedConsensusServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedConsensusServer) AcceptMigration added in v0.1.0

func (UnimplementedConsensusServer) DeReference added in v0.2.0

func (UnimplementedConsensusServer) Follow added in v0.2.0

func (UnimplementedConsensusServer) Ping added in v0.1.0

func (UnimplementedConsensusServer) PrefixScan added in v0.1.0

func (UnimplementedConsensusServer) ReadRecord added in v0.2.0

func (UnimplementedConsensusServer) Replicate added in v0.2.0

func (UnimplementedConsensusServer) RequestSlots added in v0.2.0

func (UnimplementedConsensusServer) StealTableOwnership added in v0.1.0

func (UnimplementedConsensusServer) WriteMigration added in v0.1.0

type UnsafeConsensusServer added in v0.1.0

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

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

type WriteKeyRequest added in v0.1.0

type WriteKeyRequest struct {
	Sender   *Node           `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // The node requesting the write
	Key      []byte          `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`       // The table the key belongs to
	Mutation *RecordMutation `protobuf:"bytes,4,opt,name=mutation,proto3" json:"mutation,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteKeyRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use WriteKeyRequest.ProtoReflect.Descriptor instead.

func (*WriteKeyRequest) GetKey added in v0.2.0

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

func (*WriteKeyRequest) GetMutation added in v0.2.0

func (x *WriteKeyRequest) GetMutation() *RecordMutation

func (*WriteKeyRequest) GetSender added in v0.1.0

func (x *WriteKeyRequest) GetSender() *Node

func (*WriteKeyRequest) ProtoMessage added in v0.1.0

func (*WriteKeyRequest) ProtoMessage()

func (*WriteKeyRequest) ProtoReflect added in v0.1.0

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

func (*WriteKeyRequest) Reset added in v0.1.0

func (x *WriteKeyRequest) Reset()

func (*WriteKeyRequest) String added in v0.1.0

func (x *WriteKeyRequest) String() string

type WriteKeyResponse added in v0.1.0

type WriteKeyResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Whether the write was successful
	// contains filtered or unexported fields
}

func (*WriteKeyResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use WriteKeyResponse.ProtoReflect.Descriptor instead.

func (*WriteKeyResponse) GetSuccess added in v0.1.0

func (x *WriteKeyResponse) GetSuccess() bool

func (*WriteKeyResponse) ProtoMessage added in v0.1.0

func (*WriteKeyResponse) ProtoMessage()

func (*WriteKeyResponse) ProtoReflect added in v0.1.0

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

func (*WriteKeyResponse) Reset added in v0.1.0

func (x *WriteKeyResponse) Reset()

func (*WriteKeyResponse) String added in v0.1.0

func (x *WriteKeyResponse) String() string

type WriteMigrationRequest added in v0.1.0

type WriteMigrationRequest struct {
	Record *RecordMutation `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteMigrationRequest) Descriptor deprecated added in v0.1.0

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

Deprecated: Use WriteMigrationRequest.ProtoReflect.Descriptor instead.

func (*WriteMigrationRequest) GetRecord added in v0.2.0

func (x *WriteMigrationRequest) GetRecord() *RecordMutation

func (*WriteMigrationRequest) ProtoMessage added in v0.1.0

func (*WriteMigrationRequest) ProtoMessage()

func (*WriteMigrationRequest) ProtoReflect added in v0.1.0

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

func (*WriteMigrationRequest) Reset added in v0.1.0

func (x *WriteMigrationRequest) Reset()

func (*WriteMigrationRequest) String added in v0.1.0

func (x *WriteMigrationRequest) String() string

type WriteMigrationResponse added in v0.1.0

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

func (*WriteMigrationResponse) Descriptor deprecated added in v0.1.0

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

Deprecated: Use WriteMigrationResponse.ProtoReflect.Descriptor instead.

func (*WriteMigrationResponse) GetAccepted added in v0.2.0

func (x *WriteMigrationResponse) GetAccepted() bool

func (*WriteMigrationResponse) ProtoMessage added in v0.1.0

func (*WriteMigrationResponse) ProtoMessage()

func (*WriteMigrationResponse) ProtoReflect added in v0.1.0

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

func (*WriteMigrationResponse) Reset added in v0.1.0

func (x *WriteMigrationResponse) Reset()

func (*WriteMigrationResponse) String added in v0.1.0

func (x *WriteMigrationResponse) String() string

Jump to

Keyboard shortcuts

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