internalpb

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NatsMessageType_name = map[int32]string{
		0: "NATS_MESSAGE_TYPE_REGISTER",
		1: "NATS_MESSAGE_TYPE_DEREGISTER",
		2: "NATS_MESSAGE_TYPE_REQUEST",
		3: "NATS_MESSAGE_TYPE_RESPONSE",
	}
	NatsMessageType_value = map[string]int32{
		"NATS_MESSAGE_TYPE_REGISTER":   0,
		"NATS_MESSAGE_TYPE_DEREGISTER": 1,
		"NATS_MESSAGE_TYPE_REQUEST":    2,
		"NATS_MESSAGE_TYPE_RESPONSE":   3,
	}
)

Enum value maps for NatsMessageType.

View Source
var File_internal_gokv_proto protoreflect.FileDescriptor
View Source
var File_internal_nats_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DeleteRequest

type DeleteRequest struct {

	// Specifies the key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

DeleteRequest is used to remove a distributed key from the cluster

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetKey

func (x *DeleteRequest) GetKey() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

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

DeleteResponse is the response to DeleteRequest

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type Entry

type Entry struct {

	// Specifies the key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Specifies the value
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// States whether it is archived or not
	Archived *bool `protobuf:"varint,3,opt,name=archived,proto3,oneof" json:"archived,omitempty"`
	// Specifies the timestamp which represents the last updated time
	LastUpdatedTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=last_updated_time,json=lastUpdatedTime,proto3" json:"last_updated_time,omitempty"`
	// Specifies the expiration
	Expiry *durationpb.Duration `protobuf:"bytes,5,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

Entry represents the key/value pair

func (*Entry) Descriptor deprecated

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

Deprecated: Use Entry.ProtoReflect.Descriptor instead.

func (*Entry) GetArchived

func (x *Entry) GetArchived() bool

func (*Entry) GetExpiry

func (x *Entry) GetExpiry() *durationpb.Duration

func (*Entry) GetKey

func (x *Entry) GetKey() string

func (*Entry) GetLastUpdatedTime

func (x *Entry) GetLastUpdatedTime() *timestamppb.Timestamp

func (*Entry) GetValue

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

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) ProtoReflect

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

func (*Entry) Reset

func (x *Entry) Reset()

func (*Entry) String

func (x *Entry) String() string

type GetRequest

type GetRequest struct {

	// Specifies the key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

GetRequest is used to fetch the value of a given key

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetKey

func (x *GetRequest) GetKey() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {

	// Specifies the specifies
	Entry *Entry `protobuf:"bytes,1,opt,name=entry,proto3" json:"entry,omitempty"`
	// contains filtered or unexported fields
}

GetResponse is the response to GetRequest

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetEntry

func (x *GetResponse) GetEntry() *Entry

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type KeyExistResponse

type KeyExistResponse struct {

	// Specifies the status of the request
	Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyExistResponse) Descriptor deprecated

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

Deprecated: Use KeyExistResponse.ProtoReflect.Descriptor instead.

func (*KeyExistResponse) GetExists

func (x *KeyExistResponse) GetExists() bool

func (*KeyExistResponse) ProtoMessage

func (*KeyExistResponse) ProtoMessage()

func (*KeyExistResponse) ProtoReflect

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

func (*KeyExistResponse) Reset

func (x *KeyExistResponse) Reset()

func (*KeyExistResponse) String

func (x *KeyExistResponse) String() string

type KeyExistsRequest

type KeyExistsRequest struct {

	// Specifies the key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

KeyExistsRequest is used to check the existence of a given key in the cluster

func (*KeyExistsRequest) Descriptor deprecated

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

Deprecated: Use KeyExistsRequest.ProtoReflect.Descriptor instead.

func (*KeyExistsRequest) GetKey

func (x *KeyExistsRequest) GetKey() string

func (*KeyExistsRequest) ProtoMessage

func (*KeyExistsRequest) ProtoMessage()

func (*KeyExistsRequest) ProtoReflect

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

func (*KeyExistsRequest) Reset

func (x *KeyExistsRequest) Reset()

func (*KeyExistsRequest) String

func (x *KeyExistsRequest) String() string

type ListRequest

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

ListRequest is used to return all entries at a point in time

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// Specifies the list of entries
	Entries []*Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
	// contains filtered or unexported fields
}

ListResponse is the response to the ListRequest

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetEntries

func (x *ListResponse) GetEntries() []*Entry

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type NatsMessage

type NatsMessage struct {

	// Specifies the host name of the client node
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Specifies the port of the client node
	Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	// Specifies the client name
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies the message type
	MessageType NatsMessageType `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

NatsMessage defines the NATs message used by the discovery provider

func (*NatsMessage) Descriptor deprecated

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

Deprecated: Use NatsMessage.ProtoReflect.Descriptor instead.

func (*NatsMessage) GetHost

func (x *NatsMessage) GetHost() string

func (*NatsMessage) GetMessageType

func (x *NatsMessage) GetMessageType() NatsMessageType

func (*NatsMessage) GetName

func (x *NatsMessage) GetName() string

func (*NatsMessage) GetPort

func (x *NatsMessage) GetPort() int32

func (*NatsMessage) ProtoMessage

func (*NatsMessage) ProtoMessage()

func (*NatsMessage) ProtoReflect

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

func (*NatsMessage) Reset

func (x *NatsMessage) Reset()

func (*NatsMessage) String

func (x *NatsMessage) String() string

type NatsMessageType

type NatsMessageType int32

NatsMessageType defines the NATs message type

const (
	NatsMessageType_NATS_MESSAGE_TYPE_REGISTER   NatsMessageType = 0
	NatsMessageType_NATS_MESSAGE_TYPE_DEREGISTER NatsMessageType = 1
	NatsMessageType_NATS_MESSAGE_TYPE_REQUEST    NatsMessageType = 2
	NatsMessageType_NATS_MESSAGE_TYPE_RESPONSE   NatsMessageType = 3
)

func (NatsMessageType) Descriptor

func (NatsMessageType) Enum

func (x NatsMessageType) Enum() *NatsMessageType

func (NatsMessageType) EnumDescriptor deprecated

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

Deprecated: Use NatsMessageType.Descriptor instead.

func (NatsMessageType) Number

func (NatsMessageType) String

func (x NatsMessageType) String() string

func (NatsMessageType) Type

type NodeMeta

type NodeMeta struct {

	// Specifies the node name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Specifies the node host
	Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	// Specifies the node port
	Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// Specifies the node discovery port
	DiscoveryPort uint32 `protobuf:"varint,4,opt,name=discovery_port,json=discoveryPort,proto3" json:"discovery_port,omitempty"`
	// Specifies the creation time
	CreationTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"`
	// contains filtered or unexported fields
}

NodeMeta defines the node metadata

func (*NodeMeta) Descriptor deprecated

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

Deprecated: Use NodeMeta.ProtoReflect.Descriptor instead.

func (*NodeMeta) GetCreationTime

func (x *NodeMeta) GetCreationTime() *timestamppb.Timestamp

func (*NodeMeta) GetDiscoveryPort

func (x *NodeMeta) GetDiscoveryPort() uint32

func (*NodeMeta) GetHost

func (x *NodeMeta) GetHost() string

func (*NodeMeta) GetName

func (x *NodeMeta) GetName() string

func (*NodeMeta) GetPort

func (x *NodeMeta) GetPort() uint32

func (*NodeMeta) ProtoMessage

func (*NodeMeta) ProtoMessage()

func (*NodeMeta) ProtoReflect

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

func (*NodeMeta) Reset

func (x *NodeMeta) Reset()

func (*NodeMeta) String

func (x *NodeMeta) String() string

type NodeState

type NodeState struct {

	// Specifies the nodeId
	NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// Specifies the entries
	Entries map[string]*Entry `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

NodeState defines the node state This will be distributed in the cluster

func (*NodeState) Descriptor deprecated

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

Deprecated: Use NodeState.ProtoReflect.Descriptor instead.

func (*NodeState) GetEntries

func (x *NodeState) GetEntries() map[string]*Entry

func (*NodeState) GetNodeId

func (x *NodeState) GetNodeId() string

func (*NodeState) ProtoMessage

func (*NodeState) ProtoMessage()

func (*NodeState) ProtoReflect

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

func (*NodeState) Reset

func (x *NodeState) Reset()

func (*NodeState) String

func (x *NodeState) String() string

type PeersState

type PeersState struct {

	// Specifies the peer states
	RemoteStates map[string]*NodeState `` /* 185-byte string literal not displayed */
	// contains filtered or unexported fields
}

PeersState defines the remote nodes state that will be handled by the various peers

func (*PeersState) Descriptor deprecated

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

Deprecated: Use PeersState.ProtoReflect.Descriptor instead.

func (*PeersState) GetRemoteStates

func (x *PeersState) GetRemoteStates() map[string]*NodeState

func (*PeersState) ProtoMessage

func (*PeersState) ProtoMessage()

func (*PeersState) ProtoReflect

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

func (*PeersState) Reset

func (x *PeersState) Reset()

func (*PeersState) String

func (x *PeersState) String() string

type PutRequest

type PutRequest struct {

	// Specifies the key
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Specifies the value
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// Specifies the expiration
	Expiry *durationpb.Duration `protobuf:"bytes,3,opt,name=expiry,proto3" json:"expiry,omitempty"`
	// contains filtered or unexported fields
}

PutRequest is used to distribute a given key/value

func (*PutRequest) Descriptor deprecated

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

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetExpiry

func (x *PutRequest) GetExpiry() *durationpb.Duration

func (*PutRequest) GetKey

func (x *PutRequest) GetKey() string

func (*PutRequest) GetValue

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

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

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

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type PutResponse

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

PutResponse is the response to PutRequest

func (*PutResponse) Descriptor deprecated

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

Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) ProtoReflect

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

func (*PutResponse) Reset

func (x *PutResponse) Reset()

func (*PutResponse) String

func (x *PutResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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