varlogpb

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMetadata        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMetadata          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group")
)
View Source
var LogStreamStatus_name = map[int32]string{
	0: "LS_STATUS_RUNNING",
	1: "LS_STATUS_SEALING",
	2: "LS_STATUS_SEALED",
	3: "LS_STATUS_DELETED",
	4: "LS_STATUS_UNSEALING",
}
View Source
var LogStreamStatus_value = map[string]int32{
	"LS_STATUS_RUNNING":   0,
	"LS_STATUS_SEALING":   1,
	"LS_STATUS_SEALED":    2,
	"LS_STATUS_DELETED":   3,
	"LS_STATUS_UNSEALING": 4,
}
View Source
var StorageNodeStatus_name = map[int32]string{
	0: "STORAGE_NODE_STATUS_RUNNING",
	1: "STORAGE_NODE_STATUS_DELETED",
}
View Source
var StorageNodeStatus_value = map[string]int32{
	"STORAGE_NODE_STATUS_RUNNING": 0,
	"STORAGE_NODE_STATUS_DELETED": 1,
}
View Source
var TopicStatus_name = map[int32]string{
	0: "TOPIC_STATUS_RUNNING",
	1: "TOPIC_STATUS_DELETED",
}
View Source
var TopicStatus_value = map[string]int32{
	"TOPIC_STATUS_RUNNING": 0,
	"TOPIC_STATUS_DELETED": 1,
}

Functions

func EqualReplicas

func EqualReplicas(xs []LogStreamReplica, ys []LogStreamReplica) bool

func ValidReplicas

func ValidReplicas(replicas []LogStreamReplica) error

ValidReplicas checks whether given replicas are valid. Valid replicas should contain at least one replica, and all replicas have the same LogStreamID. They also have different StorageNodeIDs.

Types

type CommitContext

type CommitContext struct {
	Version            github_com_kakao_varlog_pkg_types.Version `protobuf:"varint,1,opt,name=version,proto3,casttype=github.com/kakao/varlog/pkg/types.Version" json:"version,omitempty"`
	HighWatermark      github_com_kakao_varlog_pkg_types.GLSN    `` /* 149-byte string literal not displayed */
	CommittedGLSNBegin github_com_kakao_varlog_pkg_types.GLSN    `` /* 166-byte string literal not displayed */
	CommittedGLSNEnd   github_com_kakao_varlog_pkg_types.GLSN    `` /* 160-byte string literal not displayed */
	CommittedLLSNBegin github_com_kakao_varlog_pkg_types.LLSN    `` /* 166-byte string literal not displayed */
}

func (*CommitContext) Descriptor

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

func (*CommitContext) GetCommittedGLSNBegin

func (m *CommitContext) GetCommittedGLSNBegin() github_com_kakao_varlog_pkg_types.GLSN

func (*CommitContext) GetCommittedGLSNEnd

func (m *CommitContext) GetCommittedGLSNEnd() github_com_kakao_varlog_pkg_types.GLSN

func (*CommitContext) GetCommittedLLSNBegin

func (m *CommitContext) GetCommittedLLSNBegin() github_com_kakao_varlog_pkg_types.LLSN

func (*CommitContext) GetHighWatermark

func (*CommitContext) GetVersion

func (*CommitContext) Marshal

func (m *CommitContext) Marshal() (dAtA []byte, err error)

func (*CommitContext) MarshalTo

func (m *CommitContext) MarshalTo(dAtA []byte) (int, error)

func (*CommitContext) MarshalToSizedBuffer

func (m *CommitContext) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CommitContext) ProtoMessage

func (*CommitContext) ProtoMessage()

func (*CommitContext) ProtoSize

func (m *CommitContext) ProtoSize() (n int)

func (*CommitContext) Reset

func (m *CommitContext) Reset()

func (*CommitContext) String

func (m *CommitContext) String() string

func (*CommitContext) Unmarshal

func (m *CommitContext) Unmarshal(dAtA []byte) error

func (*CommitContext) XXX_DiscardUnknown

func (m *CommitContext) XXX_DiscardUnknown()

func (*CommitContext) XXX_Marshal

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

func (*CommitContext) XXX_Merge

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

func (*CommitContext) XXX_Size

func (m *CommitContext) XXX_Size() int

func (*CommitContext) XXX_Unmarshal

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

type LogEntry

type LogEntry struct {
	LogEntryMeta `protobuf:"bytes,1,opt,name=meta,proto3,embedded=meta" json:"meta"`
	Data         []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func InvalidLogEntry

func InvalidLogEntry() LogEntry

func (*LogEntry) Descriptor

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

func (*LogEntry) Equal

func (this *LogEntry) Equal(that interface{}) bool

func (*LogEntry) GetData

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

func (LogEntry) Invalid

func (le LogEntry) Invalid() bool

func (*LogEntry) Marshal

func (m *LogEntry) Marshal() (dAtA []byte, err error)

func (*LogEntry) MarshalTo

func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)

func (*LogEntry) MarshalToSizedBuffer

func (m *LogEntry) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogEntry) ProtoMessage

func (*LogEntry) ProtoMessage()

func (*LogEntry) ProtoSize

func (m *LogEntry) ProtoSize() (n int)

func (*LogEntry) Reset

func (m *LogEntry) Reset()

func (*LogEntry) String

func (m *LogEntry) String() string

func (*LogEntry) Unmarshal

func (m *LogEntry) Unmarshal(dAtA []byte) error

func (*LogEntry) XXX_DiscardUnknown

func (m *LogEntry) XXX_DiscardUnknown()

func (*LogEntry) XXX_Marshal

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

func (*LogEntry) XXX_Merge

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

func (*LogEntry) XXX_Size

func (m *LogEntry) XXX_Size() int

func (*LogEntry) XXX_Unmarshal

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

type LogEntryMeta

type LogEntryMeta struct {
	TopicID     github_com_kakao_varlog_pkg_types.TopicID     `` /* 134-byte string literal not displayed */
	LogStreamID github_com_kakao_varlog_pkg_types.LogStreamID `` /* 152-byte string literal not displayed */
	GLSN        github_com_kakao_varlog_pkg_types.GLSN        `protobuf:"varint,3,opt,name=glsn,proto3,casttype=github.com/kakao/varlog/pkg/types.GLSN" json:"glsn,omitempty"`
	LLSN        github_com_kakao_varlog_pkg_types.LLSN        `protobuf:"varint,4,opt,name=llsn,proto3,casttype=github.com/kakao/varlog/pkg/types.LLSN" json:"llsn,omitempty"`
}

func InvalidLogEntryMeta

func InvalidLogEntryMeta() LogEntryMeta

func (*LogEntryMeta) Descriptor

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

func (*LogEntryMeta) Equal

func (this *LogEntryMeta) Equal(that interface{}) bool

func (*LogEntryMeta) GetGLSN

func (*LogEntryMeta) GetLLSN

func (*LogEntryMeta) GetLogStreamID

func (*LogEntryMeta) GetTopicID

func (*LogEntryMeta) Marshal

func (m *LogEntryMeta) Marshal() (dAtA []byte, err error)

func (*LogEntryMeta) MarshalTo

func (m *LogEntryMeta) MarshalTo(dAtA []byte) (int, error)

func (*LogEntryMeta) MarshalToSizedBuffer

func (m *LogEntryMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogEntryMeta) ProtoMessage

func (*LogEntryMeta) ProtoMessage()

func (*LogEntryMeta) ProtoSize

func (m *LogEntryMeta) ProtoSize() (n int)

func (*LogEntryMeta) Reset

func (m *LogEntryMeta) Reset()

func (*LogEntryMeta) String

func (m *LogEntryMeta) String() string

func (*LogEntryMeta) Unmarshal

func (m *LogEntryMeta) Unmarshal(dAtA []byte) error

func (*LogEntryMeta) XXX_DiscardUnknown

func (m *LogEntryMeta) XXX_DiscardUnknown()

func (*LogEntryMeta) XXX_Marshal

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

func (*LogEntryMeta) XXX_Merge

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

func (*LogEntryMeta) XXX_Size

func (m *LogEntryMeta) XXX_Size() int

func (*LogEntryMeta) XXX_Unmarshal

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

type LogSequenceNumber

type LogSequenceNumber struct {
	LLSN github_com_kakao_varlog_pkg_types.LLSN `protobuf:"varint,1,opt,name=llsn,proto3,casttype=github.com/kakao/varlog/pkg/types.LLSN" json:"llsn,omitempty"`
	GLSN github_com_kakao_varlog_pkg_types.GLSN `protobuf:"varint,2,opt,name=glsn,proto3,casttype=github.com/kakao/varlog/pkg/types.GLSN" json:"glsn,omitempty"`
}

LogSequenceNumber wraps LLSN and GLSN. LLSN is the sequence number of logs in a log stream. GLSN is the sequence number of logs in a topic.

func (*LogSequenceNumber) Descriptor

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

func (*LogSequenceNumber) Equal

func (this *LogSequenceNumber) Equal(that interface{}) bool

func (*LogSequenceNumber) GetGLSN

func (*LogSequenceNumber) GetLLSN

func (LogSequenceNumber) Invalid added in v0.7.0

func (lsn LogSequenceNumber) Invalid() bool

func (*LogSequenceNumber) Marshal

func (m *LogSequenceNumber) Marshal() (dAtA []byte, err error)

func (*LogSequenceNumber) MarshalTo

func (m *LogSequenceNumber) MarshalTo(dAtA []byte) (int, error)

func (*LogSequenceNumber) MarshalToSizedBuffer

func (m *LogSequenceNumber) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogSequenceNumber) ProtoMessage

func (*LogSequenceNumber) ProtoMessage()

func (*LogSequenceNumber) ProtoSize

func (m *LogSequenceNumber) ProtoSize() (n int)

func (*LogSequenceNumber) Reset

func (m *LogSequenceNumber) Reset()

func (*LogSequenceNumber) String

func (m *LogSequenceNumber) String() string

func (*LogSequenceNumber) Unmarshal

func (m *LogSequenceNumber) Unmarshal(dAtA []byte) error

func (*LogSequenceNumber) XXX_DiscardUnknown

func (m *LogSequenceNumber) XXX_DiscardUnknown()

func (*LogSequenceNumber) XXX_Marshal

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

func (*LogSequenceNumber) XXX_Merge

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

func (*LogSequenceNumber) XXX_Size

func (m *LogSequenceNumber) XXX_Size() int

func (*LogSequenceNumber) XXX_Unmarshal

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

type LogStreamDescriptor

type LogStreamDescriptor struct {
	TopicID     github_com_kakao_varlog_pkg_types.TopicID     `protobuf:"varint,1,opt,name=topic_id,json=topicId,proto3,casttype=github.com/kakao/varlog/pkg/types.TopicID" json:"topicId"`
	LogStreamID github_com_kakao_varlog_pkg_types.LogStreamID `` /* 140-byte string literal not displayed */
	Status      LogStreamStatus                               `protobuf:"varint,3,opt,name=status,proto3,enum=varlog.varlogpb.LogStreamStatus" json:"status,omitempty"`
	Replicas    []*ReplicaDescriptor                          `protobuf:"bytes,4,rep,name=replicas,proto3" json:"replicas,omitempty"`
}

LogStreamDescriptor is metadata to persist information of a log stream in the metadata repository.

func (*LogStreamDescriptor) Descriptor

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

func (*LogStreamDescriptor) Equal

func (this *LogStreamDescriptor) Equal(that interface{}) bool

func (*LogStreamDescriptor) GetLogStreamID

func (*LogStreamDescriptor) GetReplicas

func (m *LogStreamDescriptor) GetReplicas() []*ReplicaDescriptor

func (*LogStreamDescriptor) GetStatus

func (m *LogStreamDescriptor) GetStatus() LogStreamStatus

func (*LogStreamDescriptor) GetTopicID

func (*LogStreamDescriptor) IsReplica

func (l *LogStreamDescriptor) IsReplica(snID types.StorageNodeID) bool

func (*LogStreamDescriptor) Marshal

func (m *LogStreamDescriptor) Marshal() (dAtA []byte, err error)

func (*LogStreamDescriptor) MarshalTo

func (m *LogStreamDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*LogStreamDescriptor) MarshalToSizedBuffer

func (m *LogStreamDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogStreamDescriptor) ProtoMessage

func (*LogStreamDescriptor) ProtoMessage()

func (*LogStreamDescriptor) ProtoSize

func (m *LogStreamDescriptor) ProtoSize() (n int)

func (*LogStreamDescriptor) Reset

func (m *LogStreamDescriptor) Reset()

func (*LogStreamDescriptor) String

func (m *LogStreamDescriptor) String() string

func (*LogStreamDescriptor) Unmarshal

func (m *LogStreamDescriptor) Unmarshal(dAtA []byte) error

func (*LogStreamDescriptor) Valid

func (l *LogStreamDescriptor) Valid() bool

func (LogStreamDescriptor) Validate added in v0.16.0

func (lsd LogStreamDescriptor) Validate() error

func (*LogStreamDescriptor) XXX_DiscardUnknown

func (m *LogStreamDescriptor) XXX_DiscardUnknown()

func (*LogStreamDescriptor) XXX_Marshal

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

func (*LogStreamDescriptor) XXX_Merge

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

func (*LogStreamDescriptor) XXX_Size

func (m *LogStreamDescriptor) XXX_Size() int

func (*LogStreamDescriptor) XXX_Unmarshal

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

type LogStreamReplica

type LogStreamReplica struct {
	StorageNode    `protobuf:"bytes,1,opt,name=storage_node,json=storageNode,proto3,embedded=storage_node" json:""`
	TopicLogStream `protobuf:"bytes,2,opt,name=topic_log_stream,json=topicLogStream,proto3,embedded=topic_log_stream" json:""`
}

LogStreamReplica represents replica of log stream.

func (*LogStreamReplica) Descriptor

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

func (*LogStreamReplica) Equal

func (this *LogStreamReplica) Equal(that interface{}) bool

func (*LogStreamReplica) Marshal

func (m *LogStreamReplica) Marshal() (dAtA []byte, err error)

func (*LogStreamReplica) MarshalTo

func (m *LogStreamReplica) MarshalTo(dAtA []byte) (int, error)

func (*LogStreamReplica) MarshalToSizedBuffer

func (m *LogStreamReplica) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LogStreamReplica) ProtoMessage

func (*LogStreamReplica) ProtoMessage()

func (*LogStreamReplica) ProtoSize

func (m *LogStreamReplica) ProtoSize() (n int)

func (*LogStreamReplica) Reset

func (m *LogStreamReplica) Reset()

func (*LogStreamReplica) String

func (m *LogStreamReplica) String() string

func (*LogStreamReplica) Unmarshal

func (m *LogStreamReplica) Unmarshal(dAtA []byte) error

func (*LogStreamReplica) XXX_DiscardUnknown

func (m *LogStreamReplica) XXX_DiscardUnknown()

func (*LogStreamReplica) XXX_Marshal

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

func (*LogStreamReplica) XXX_Merge

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

func (*LogStreamReplica) XXX_Size

func (m *LogStreamReplica) XXX_Size() int

func (*LogStreamReplica) XXX_Unmarshal

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

type LogStreamStatus

type LogStreamStatus int32
const (
	LogStreamStatusRunning   LogStreamStatus = 0
	LogStreamStatusSealing   LogStreamStatus = 1
	LogStreamStatusSealed    LogStreamStatus = 2
	LogStreamStatusDeleted   LogStreamStatus = 3
	LogStreamStatusUnsealing LogStreamStatus = 4
)

func (LogStreamStatus) Deleted

func (s LogStreamStatus) Deleted() bool

func (LogStreamStatus) EnumDescriptor

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

func (LogStreamStatus) MarshalJSON

func (lss LogStreamStatus) MarshalJSON() ([]byte, error)

MarshalJSON returns the JSON encoding of the LogStreamStatus.

func (LogStreamStatus) Running

func (s LogStreamStatus) Running() bool

func (LogStreamStatus) Sealed

func (s LogStreamStatus) Sealed() bool

func (LogStreamStatus) String

func (x LogStreamStatus) String() string

func (*LogStreamStatus) UnmarshalJSON

func (lss *LogStreamStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON parses the JSON-encoded data and stores the result in the value of type LogStreamStatus.

type MetadataDescriptor

type MetadataDescriptor struct {
	AppliedIndex uint64                   `protobuf:"varint,1,opt,name=applied_index,json=appliedIndex,proto3" json:"appliedIndex"`
	StorageNodes []*StorageNodeDescriptor `protobuf:"bytes,2,rep,name=storage_nodes,json=storageNodes,proto3" json:"storageNodes"`
	LogStreams   []*LogStreamDescriptor   `protobuf:"bytes,3,rep,name=log_streams,json=logStreams,proto3" json:"logStreams"`
	Topics       []*TopicDescriptor       `protobuf:"bytes,4,rep,name=topics,proto3" json:"topics"`
}

MetadataDescriptor is metadata to persist the overall state of the cluster in the metadata repository.

func (*MetadataDescriptor) DeleteLogStream

func (m *MetadataDescriptor) DeleteLogStream(id types.LogStreamID) error

func (*MetadataDescriptor) DeleteStorageNode

func (m *MetadataDescriptor) DeleteStorageNode(id types.StorageNodeID) error

func (*MetadataDescriptor) DeleteTopic

func (m *MetadataDescriptor) DeleteTopic(id types.TopicID) error

func (*MetadataDescriptor) Descriptor

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

func (*MetadataDescriptor) Equal

func (this *MetadataDescriptor) Equal(that interface{}) bool

func (*MetadataDescriptor) GetAppliedIndex

func (m *MetadataDescriptor) GetAppliedIndex() uint64

func (*MetadataDescriptor) GetLogStream

func (*MetadataDescriptor) GetLogStreams

func (m *MetadataDescriptor) GetLogStreams() []*LogStreamDescriptor

func (*MetadataDescriptor) GetReplicasByStorageNodeID

func (m *MetadataDescriptor) GetReplicasByStorageNodeID(id types.StorageNodeID) []*ReplicaDescriptor

func (*MetadataDescriptor) GetStorageNode

GetStorageNode finds the storage node specified by the argument id. It returns nil if the storage node does not exist.

func (*MetadataDescriptor) GetStorageNodes

func (m *MetadataDescriptor) GetStorageNodes() []*StorageNodeDescriptor

func (*MetadataDescriptor) GetTopic

func (*MetadataDescriptor) GetTopics

func (m *MetadataDescriptor) GetTopics() []*TopicDescriptor

func (*MetadataDescriptor) HaveLogStream

func (*MetadataDescriptor) HaveStorageNode

func (*MetadataDescriptor) HaveTopic

func (m *MetadataDescriptor) HaveTopic(id types.TopicID) (*TopicDescriptor, error)

func (*MetadataDescriptor) InsertLogStream

func (m *MetadataDescriptor) InsertLogStream(ls *LogStreamDescriptor) error

func (*MetadataDescriptor) InsertStorageNode

func (m *MetadataDescriptor) InsertStorageNode(sn *StorageNodeDescriptor) error

func (*MetadataDescriptor) InsertTopic

func (m *MetadataDescriptor) InsertTopic(topic *TopicDescriptor) error

func (*MetadataDescriptor) Marshal

func (m *MetadataDescriptor) Marshal() (dAtA []byte, err error)

func (*MetadataDescriptor) MarshalTo

func (m *MetadataDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*MetadataDescriptor) MarshalToSizedBuffer

func (m *MetadataDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetadataDescriptor) Must

func (*MetadataDescriptor) MustHaveLogStream

func (m *MetadataDescriptor) MustHaveLogStream(id types.LogStreamID) (*LogStreamDescriptor, error)

func (*MetadataDescriptor) MustHaveStorageNode

func (m *MetadataDescriptor) MustHaveStorageNode(id types.StorageNodeID) (*StorageNodeDescriptor, error)

func (*MetadataDescriptor) MustHaveTopic

func (m *MetadataDescriptor) MustHaveTopic(id types.TopicID) (*TopicDescriptor, error)

func (*MetadataDescriptor) MustNotHaveLogStream

func (m *MetadataDescriptor) MustNotHaveLogStream(id types.LogStreamID) error

func (*MetadataDescriptor) MustNotHaveStorageNode

func (m *MetadataDescriptor) MustNotHaveStorageNode(id types.StorageNodeID) error

func (*MetadataDescriptor) MustNotHaveTopic

func (m *MetadataDescriptor) MustNotHaveTopic(id types.TopicID) error

func (*MetadataDescriptor) NotHaveLogStream

func (m *MetadataDescriptor) NotHaveLogStream(id types.LogStreamID) error

func (*MetadataDescriptor) NotHaveStorageNode

func (m *MetadataDescriptor) NotHaveStorageNode(id types.StorageNodeID) error

func (*MetadataDescriptor) NotHaveTopic

func (m *MetadataDescriptor) NotHaveTopic(id types.TopicID) error

func (*MetadataDescriptor) ProtoMessage

func (*MetadataDescriptor) ProtoMessage()

func (*MetadataDescriptor) ProtoSize

func (m *MetadataDescriptor) ProtoSize() (n int)

func (*MetadataDescriptor) Reset

func (m *MetadataDescriptor) Reset()

func (*MetadataDescriptor) String

func (m *MetadataDescriptor) String() string

func (*MetadataDescriptor) Unmarshal

func (m *MetadataDescriptor) Unmarshal(dAtA []byte) error

func (*MetadataDescriptor) UpdateLogStream

func (m *MetadataDescriptor) UpdateLogStream(ls *LogStreamDescriptor) error

func (*MetadataDescriptor) UpdateStorageNode

func (m *MetadataDescriptor) UpdateStorageNode(sn *StorageNodeDescriptor) error

func (*MetadataDescriptor) UpdateTopic

func (m *MetadataDescriptor) UpdateTopic(topic *TopicDescriptor) error

func (*MetadataDescriptor) UpsertLogStream

func (m *MetadataDescriptor) UpsertLogStream(ls *LogStreamDescriptor) error

func (*MetadataDescriptor) UpsertStorageNode

func (m *MetadataDescriptor) UpsertStorageNode(sn *StorageNodeDescriptor) error

func (*MetadataDescriptor) UpsertTopic

func (m *MetadataDescriptor) UpsertTopic(topic *TopicDescriptor) error

func (*MetadataDescriptor) XXX_DiscardUnknown

func (m *MetadataDescriptor) XXX_DiscardUnknown()

func (*MetadataDescriptor) XXX_Marshal

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

func (*MetadataDescriptor) XXX_Merge

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

func (*MetadataDescriptor) XXX_Size

func (m *MetadataDescriptor) XXX_Size() int

func (*MetadataDescriptor) XXX_Unmarshal

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

type MetadataRepositoryNode

type MetadataRepositoryNode struct {
	NodeID  github_com_kakao_varlog_pkg_types.NodeID `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3,casttype=github.com/kakao/varlog/pkg/types.NodeID" json:"nodeId"`
	RaftURL string                                   `protobuf:"bytes,2,opt,name=raft_url,json=raftUrl,proto3" json:"raftURL"`
	RPCAddr string                                   `protobuf:"bytes,3,opt,name=rpc_addr,json=rpcAddr,proto3" json:"rpcAddr"`
	Leader  bool                                     `protobuf:"varint,4,opt,name=leader,proto3" json:"leader"`
	Learner bool                                     `protobuf:"varint,5,opt,name=learner,proto3" json:"learner"`
}

func (*MetadataRepositoryNode) Descriptor

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

func (*MetadataRepositoryNode) GetLeader

func (m *MetadataRepositoryNode) GetLeader() bool

func (*MetadataRepositoryNode) GetLearner

func (m *MetadataRepositoryNode) GetLearner() bool

func (*MetadataRepositoryNode) GetNodeID

func (*MetadataRepositoryNode) GetRPCAddr

func (m *MetadataRepositoryNode) GetRPCAddr() string

func (*MetadataRepositoryNode) GetRaftURL

func (m *MetadataRepositoryNode) GetRaftURL() string

func (*MetadataRepositoryNode) Marshal

func (m *MetadataRepositoryNode) Marshal() (dAtA []byte, err error)

func (*MetadataRepositoryNode) MarshalTo

func (m *MetadataRepositoryNode) MarshalTo(dAtA []byte) (int, error)

func (*MetadataRepositoryNode) MarshalToSizedBuffer

func (m *MetadataRepositoryNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MetadataRepositoryNode) ProtoMessage

func (*MetadataRepositoryNode) ProtoMessage()

func (*MetadataRepositoryNode) ProtoSize

func (m *MetadataRepositoryNode) ProtoSize() (n int)

func (*MetadataRepositoryNode) Reset

func (m *MetadataRepositoryNode) Reset()

func (*MetadataRepositoryNode) String

func (m *MetadataRepositoryNode) String() string

func (*MetadataRepositoryNode) Unmarshal

func (m *MetadataRepositoryNode) Unmarshal(dAtA []byte) error

func (*MetadataRepositoryNode) XXX_DiscardUnknown

func (m *MetadataRepositoryNode) XXX_DiscardUnknown()

func (*MetadataRepositoryNode) XXX_Marshal

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

func (*MetadataRepositoryNode) XXX_Merge

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

func (*MetadataRepositoryNode) XXX_Size

func (m *MetadataRepositoryNode) XXX_Size() int

func (*MetadataRepositoryNode) XXX_Unmarshal

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

type ReplicaDescriptor

type ReplicaDescriptor struct {
	// StorageNodeID for a storage node where the replica is served.
	StorageNodeID github_com_kakao_varlog_pkg_types.StorageNodeID `` /* 148-byte string literal not displayed */
	// StorageNodePath is a parent directory where the data path for the replica
	// exists.
	StorageNodePath string `protobuf:"bytes,2,opt,name=storage_node_path,json=storageNodePath,proto3" json:"storageNodePath"`
	// DataPath is a directory where the log stream replica stores its data, for
	// instance, logs appended, commit history, etc.
	DataPath string `protobuf:"bytes,3,opt,name=data_path,json=dataPath,proto3" json:"dataPath"`
}

ReplicaDescriptor represents a storage node and directory where a log stream replica exists.

func (*ReplicaDescriptor) Descriptor

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

func (*ReplicaDescriptor) Equal

func (this *ReplicaDescriptor) Equal(that interface{}) bool

func (*ReplicaDescriptor) GetDataPath added in v0.4.0

func (m *ReplicaDescriptor) GetDataPath() string

func (*ReplicaDescriptor) GetStorageNodeID

func (*ReplicaDescriptor) GetStorageNodePath added in v0.4.0

func (m *ReplicaDescriptor) GetStorageNodePath() string

func (*ReplicaDescriptor) Marshal

func (m *ReplicaDescriptor) Marshal() (dAtA []byte, err error)

func (*ReplicaDescriptor) MarshalTo

func (m *ReplicaDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*ReplicaDescriptor) MarshalToSizedBuffer

func (m *ReplicaDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ReplicaDescriptor) ProtoMessage

func (*ReplicaDescriptor) ProtoMessage()

func (*ReplicaDescriptor) ProtoSize

func (m *ReplicaDescriptor) ProtoSize() (n int)

func (*ReplicaDescriptor) Reset

func (m *ReplicaDescriptor) Reset()

func (*ReplicaDescriptor) String

func (m *ReplicaDescriptor) String() string

func (*ReplicaDescriptor) Unmarshal

func (m *ReplicaDescriptor) Unmarshal(dAtA []byte) error

func (ReplicaDescriptor) Validate added in v0.16.0

func (rd ReplicaDescriptor) Validate() error

func (*ReplicaDescriptor) XXX_DiscardUnknown

func (m *ReplicaDescriptor) XXX_DiscardUnknown()

func (*ReplicaDescriptor) XXX_Marshal

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

func (*ReplicaDescriptor) XXX_Merge

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

func (*ReplicaDescriptor) XXX_Size

func (m *ReplicaDescriptor) XXX_Size() int

func (*ReplicaDescriptor) XXX_Unmarshal

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

type StorageDescriptor

type StorageDescriptor struct {
	Path  string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	Used  uint64 `protobuf:"varint,2,opt,name=used,proto3" json:"used,omitempty"`
	Total uint64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
}

func (*StorageDescriptor) Descriptor

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

func (*StorageDescriptor) Equal

func (this *StorageDescriptor) Equal(that interface{}) bool

func (*StorageDescriptor) GetPath

func (m *StorageDescriptor) GetPath() string

func (*StorageDescriptor) GetTotal

func (m *StorageDescriptor) GetTotal() uint64

func (*StorageDescriptor) GetUsed

func (m *StorageDescriptor) GetUsed() uint64

func (*StorageDescriptor) Marshal

func (m *StorageDescriptor) Marshal() (dAtA []byte, err error)

func (*StorageDescriptor) MarshalTo

func (m *StorageDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*StorageDescriptor) MarshalToSizedBuffer

func (m *StorageDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageDescriptor) ProtoMessage

func (*StorageDescriptor) ProtoMessage()

func (*StorageDescriptor) ProtoSize

func (m *StorageDescriptor) ProtoSize() (n int)

func (*StorageDescriptor) Reset

func (m *StorageDescriptor) Reset()

func (*StorageDescriptor) String

func (m *StorageDescriptor) String() string

func (*StorageDescriptor) Unmarshal

func (m *StorageDescriptor) Unmarshal(dAtA []byte) error

func (*StorageDescriptor) XXX_DiscardUnknown

func (m *StorageDescriptor) XXX_DiscardUnknown()

func (*StorageDescriptor) XXX_Marshal

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

func (*StorageDescriptor) XXX_Merge

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

func (*StorageDescriptor) XXX_Size

func (m *StorageDescriptor) XXX_Size() int

func (*StorageDescriptor) XXX_Unmarshal

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

type StorageNode

type StorageNode struct {
	StorageNodeID github_com_kakao_varlog_pkg_types.StorageNodeID `` /* 148-byte string literal not displayed */
	Address       string                                          `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
}

StorageNode is a structure to represent identifier and address of storage node.

func (*StorageNode) Descriptor

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

func (*StorageNode) Equal

func (this *StorageNode) Equal(that interface{}) bool

func (*StorageNode) GetAddress

func (m *StorageNode) GetAddress() string

func (*StorageNode) GetStorageNodeID

func (*StorageNode) Marshal

func (m *StorageNode) Marshal() (dAtA []byte, err error)

func (*StorageNode) MarshalTo

func (m *StorageNode) MarshalTo(dAtA []byte) (int, error)

func (*StorageNode) MarshalToSizedBuffer

func (m *StorageNode) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageNode) ProtoMessage

func (*StorageNode) ProtoMessage()

func (*StorageNode) ProtoSize

func (m *StorageNode) ProtoSize() (n int)

func (*StorageNode) Reset

func (m *StorageNode) Reset()

func (*StorageNode) String

func (m *StorageNode) String() string

func (*StorageNode) Unmarshal

func (m *StorageNode) Unmarshal(dAtA []byte) error

func (*StorageNode) XXX_DiscardUnknown

func (m *StorageNode) XXX_DiscardUnknown()

func (*StorageNode) XXX_Marshal

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

func (*StorageNode) XXX_Merge

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

func (*StorageNode) XXX_Size

func (m *StorageNode) XXX_Size() int

func (*StorageNode) XXX_Unmarshal

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

type StorageNodeDescriptor

type StorageNodeDescriptor struct {
	StorageNode `protobuf:"bytes,1,opt,name=storage_node,json=storageNode,proto3,embedded=storage_node" json:""`
	Status      StorageNodeStatus `protobuf:"varint,2,opt,name=status,proto3,enum=varlog.varlogpb.StorageNodeStatus" json:"status,omitempty"`
	Paths       []string          `protobuf:"bytes,3,rep,name=paths,proto3" json:"paths,omitempty"`
	CreateTime  time.Time         `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3,stdtime" json:"createTime"`
}

StorageNodeDescriptor is immutable metadata to persist information of a storage node in the metadata repository. It is also used to compare two storage nodes to decide if they are the same.

Note that only immutable fields should be added.

func (*StorageNodeDescriptor) Descriptor

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

func (*StorageNodeDescriptor) Equal

func (this *StorageNodeDescriptor) Equal(that interface{}) bool

func (*StorageNodeDescriptor) GetCreateTime

func (m *StorageNodeDescriptor) GetCreateTime() time.Time

func (*StorageNodeDescriptor) GetPaths

func (m *StorageNodeDescriptor) GetPaths() []string

func (*StorageNodeDescriptor) GetStatus

func (*StorageNodeDescriptor) Marshal

func (m *StorageNodeDescriptor) Marshal() (dAtA []byte, err error)

func (*StorageNodeDescriptor) MarshalTo

func (m *StorageNodeDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*StorageNodeDescriptor) MarshalToSizedBuffer

func (m *StorageNodeDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*StorageNodeDescriptor) ProtoMessage

func (*StorageNodeDescriptor) ProtoMessage()

func (*StorageNodeDescriptor) ProtoSize

func (m *StorageNodeDescriptor) ProtoSize() (n int)

func (*StorageNodeDescriptor) Reset

func (m *StorageNodeDescriptor) Reset()

func (*StorageNodeDescriptor) String

func (m *StorageNodeDescriptor) String() string

func (*StorageNodeDescriptor) Unmarshal

func (m *StorageNodeDescriptor) Unmarshal(dAtA []byte) error

func (*StorageNodeDescriptor) Valid

func (snd *StorageNodeDescriptor) Valid() bool

func (*StorageNodeDescriptor) XXX_DiscardUnknown

func (m *StorageNodeDescriptor) XXX_DiscardUnknown()

func (*StorageNodeDescriptor) XXX_Marshal

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

func (*StorageNodeDescriptor) XXX_Merge

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

func (*StorageNodeDescriptor) XXX_Size

func (m *StorageNodeDescriptor) XXX_Size() int

func (*StorageNodeDescriptor) XXX_Unmarshal

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

type StorageNodeStatus

type StorageNodeStatus int32
const (
	StorageNodeStatusRunning StorageNodeStatus = 0
	StorageNodeStatusDeleted StorageNodeStatus = 1
)

func (StorageNodeStatus) Deleted

func (s StorageNodeStatus) Deleted() bool

func (StorageNodeStatus) EnumDescriptor

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

func (StorageNodeStatus) Running

func (s StorageNodeStatus) Running() bool

func (StorageNodeStatus) String

func (x StorageNodeStatus) String() string

type TopicDescriptor

type TopicDescriptor struct {
	TopicID    github_com_kakao_varlog_pkg_types.TopicID       `protobuf:"varint,1,opt,name=topic_id,json=topicId,proto3,casttype=github.com/kakao/varlog/pkg/types.TopicID" json:"topicId"`
	Status     TopicStatus                                     `protobuf:"varint,2,opt,name=status,proto3,enum=varlog.varlogpb.TopicStatus" json:"status"`
	LogStreams []github_com_kakao_varlog_pkg_types.LogStreamID `` /* 153-byte string literal not displayed */
}

TopicDescriptor is metadata to persist information of a topic in the metadata repository.

func (*TopicDescriptor) Descriptor

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

func (*TopicDescriptor) Equal

func (this *TopicDescriptor) Equal(that interface{}) bool

func (*TopicDescriptor) GetLogStreams

func (*TopicDescriptor) GetStatus

func (m *TopicDescriptor) GetStatus() TopicStatus

func (*TopicDescriptor) GetTopicID

func (*TopicDescriptor) HasLogStream

func (t *TopicDescriptor) HasLogStream(lsID types.LogStreamID) bool

func (*TopicDescriptor) InsertLogStream

func (t *TopicDescriptor) InsertLogStream(lsID types.LogStreamID)

func (*TopicDescriptor) Marshal

func (m *TopicDescriptor) Marshal() (dAtA []byte, err error)

func (*TopicDescriptor) MarshalTo

func (m *TopicDescriptor) MarshalTo(dAtA []byte) (int, error)

func (*TopicDescriptor) MarshalToSizedBuffer

func (m *TopicDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TopicDescriptor) ProtoMessage

func (*TopicDescriptor) ProtoMessage()

func (*TopicDescriptor) ProtoSize

func (m *TopicDescriptor) ProtoSize() (n int)

func (*TopicDescriptor) Reset

func (m *TopicDescriptor) Reset()

func (*TopicDescriptor) String

func (m *TopicDescriptor) String() string

func (*TopicDescriptor) Unmarshal

func (m *TopicDescriptor) Unmarshal(dAtA []byte) error

func (*TopicDescriptor) XXX_DiscardUnknown

func (m *TopicDescriptor) XXX_DiscardUnknown()

func (*TopicDescriptor) XXX_Marshal

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

func (*TopicDescriptor) XXX_Merge

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

func (*TopicDescriptor) XXX_Size

func (m *TopicDescriptor) XXX_Size() int

func (*TopicDescriptor) XXX_Unmarshal

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

type TopicLogStream

type TopicLogStream struct {
	TopicID     github_com_kakao_varlog_pkg_types.TopicID     `protobuf:"varint,1,opt,name=topic_id,json=topicId,proto3,casttype=github.com/kakao/varlog/pkg/types.TopicID" json:"topicId"`
	LogStreamID github_com_kakao_varlog_pkg_types.LogStreamID `` /* 140-byte string literal not displayed */
}

TopicLogStream wraps TopicID and LogStreamID.

func (*TopicLogStream) Descriptor

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

func (*TopicLogStream) Equal

func (this *TopicLogStream) Equal(that interface{}) bool

func (*TopicLogStream) GetLogStreamID

func (*TopicLogStream) GetTopicID

func (*TopicLogStream) Marshal

func (m *TopicLogStream) Marshal() (dAtA []byte, err error)

func (*TopicLogStream) MarshalTo

func (m *TopicLogStream) MarshalTo(dAtA []byte) (int, error)

func (*TopicLogStream) MarshalToSizedBuffer

func (m *TopicLogStream) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TopicLogStream) ProtoMessage

func (*TopicLogStream) ProtoMessage()

func (*TopicLogStream) ProtoSize

func (m *TopicLogStream) ProtoSize() (n int)

func (*TopicLogStream) Reset

func (m *TopicLogStream) Reset()

func (*TopicLogStream) String

func (m *TopicLogStream) String() string

func (*TopicLogStream) Unmarshal

func (m *TopicLogStream) Unmarshal(dAtA []byte) error

func (*TopicLogStream) XXX_DiscardUnknown

func (m *TopicLogStream) XXX_DiscardUnknown()

func (*TopicLogStream) XXX_Marshal

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

func (*TopicLogStream) XXX_Merge

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

func (*TopicLogStream) XXX_Size

func (m *TopicLogStream) XXX_Size() int

func (*TopicLogStream) XXX_Unmarshal

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

type TopicStatus

type TopicStatus int32
const (
	TopicStatusRunning TopicStatus = 0
	TopicStatusDeleted TopicStatus = 1
)

func (TopicStatus) Deleted

func (s TopicStatus) Deleted() bool

func (TopicStatus) EnumDescriptor

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

func (TopicStatus) String

func (x TopicStatus) String() string

Jump to

Keyboard shortcuts

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