metadata

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 8 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 CNRole_name = map[int32]string{
	0: "TP",
	1: "AP",
}
View Source
var CNRole_value = map[string]int32{
	"TP": 0,
	"AP": 1,
}
View Source
var ServiceType_name = map[int32]string{
	0: "CN",
	1: "DN",
	2: "LOG",
}
View Source
var ServiceType_value = map[string]int32{
	"CN":  0,
	"DN":  1,
	"LOG": 2,
}

Functions

This section is empty.

Types

type CNRole added in v0.6.0

type CNRole int32

CNRole cn node role

const (
	// TP tp node
	CNRole_TP CNRole = 0
	// AP ap node
	CNRole_AP CNRole = 1
)

func MustParseCNRole added in v0.6.0

func MustParseCNRole(role string) CNRole

MustParseCNRole parse CN Role from role string

func (CNRole) EnumDescriptor added in v0.6.0

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

func (CNRole) String added in v0.6.0

func (x CNRole) String() string

type CNStore added in v0.6.0

type CNStore struct {
	// UUID CNStore uuid id
	UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	// Role CN role
	Role                 CNRole   `protobuf:"varint,2,opt,name=Role,proto3,enum=metadata.CNRole" json:"Role,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CNStore cn store metadata

func (CNStore) DebugString added in v0.6.0

func (m CNStore) DebugString() string

DebugString returns debug string

func (*CNStore) Descriptor added in v0.6.0

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

func (*CNStore) GetRole added in v0.6.0

func (m *CNStore) GetRole() CNRole

func (*CNStore) GetUUID added in v0.6.0

func (m *CNStore) GetUUID() string

func (*CNStore) Marshal added in v0.6.0

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

func (*CNStore) MarshalTo added in v0.6.0

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

func (*CNStore) MarshalToSizedBuffer added in v0.6.0

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

func (*CNStore) ProtoMessage added in v0.6.0

func (*CNStore) ProtoMessage()

func (*CNStore) Reset added in v0.6.0

func (m *CNStore) Reset()

func (*CNStore) Size added in v0.6.0

func (m *CNStore) Size() (n int)

func (*CNStore) String added in v0.6.0

func (m *CNStore) String() string

func (*CNStore) Unmarshal added in v0.6.0

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

func (*CNStore) XXX_DiscardUnknown added in v0.6.0

func (m *CNStore) XXX_DiscardUnknown()

func (*CNStore) XXX_Marshal added in v0.6.0

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

func (*CNStore) XXX_Merge added in v0.6.0

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

func (*CNStore) XXX_Size added in v0.6.0

func (m *CNStore) XXX_Size() int

func (*CNStore) XXX_Unmarshal added in v0.6.0

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

type DNShard

type DNShard struct {
	// DNShard extends DNShardRecord
	DNShardRecord `protobuf:"bytes,1,opt,name=DNShardRecord,proto3,embedded=DNShardRecord" json:"DNShardRecord"`
	// ReplicaID only one replica for one DN. The ReplicaID is specified at
	// the time the DN is created. DN restart ReplicaID will not change, when
	// a DN is migrated to another node, the ReplicaID will be reset.
	ReplicaID uint64 `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"`
	// Address is DN's external service address.
	Address              string   `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DNShard

func (DNShard) DebugString

func (m DNShard) DebugString() string

DebugString returns debug string

func (*DNShard) Descriptor

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

func (DNShard) Equal added in v0.5.1

func (m DNShard) Equal(dn DNShard) bool

Equal returns true if DNShard is same

func (*DNShard) GetAddress

func (m *DNShard) GetAddress() string

func (*DNShard) GetReplicaID

func (m *DNShard) GetReplicaID() uint64

func (DNShard) IsEmpty

func (m DNShard) IsEmpty() bool

IsEmpty return true if is a empty DNShard

func (*DNShard) Marshal

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

func (*DNShard) MarshalTo

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

func (*DNShard) MarshalToSizedBuffer

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

func (*DNShard) ProtoMessage

func (*DNShard) ProtoMessage()

func (*DNShard) Reset

func (m *DNShard) Reset()

func (*DNShard) Size

func (m *DNShard) Size() (n int)

func (*DNShard) String

func (m *DNShard) String() string

func (*DNShard) Unmarshal

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

func (*DNShard) XXX_DiscardUnknown

func (m *DNShard) XXX_DiscardUnknown()

func (*DNShard) XXX_Marshal

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

func (*DNShard) XXX_Merge

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

func (*DNShard) XXX_Size

func (m *DNShard) XXX_Size() int

func (*DNShard) XXX_Unmarshal

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

type DNShardRecord

type DNShardRecord struct {
	// ShardID the id of the DN shard.
	ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	// LogShardID a DN corresponds to a unique Shard of LogService.
	LogShardID           uint64   `protobuf:"varint,2,opt,name=LogShardID,proto3" json:"LogShardID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DNShardRecord is DN shard metadata describing what is a DN shard. It is internally used by HAKeeper to maintain how many DNs available in the system.

func (*DNShardRecord) Descriptor

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

func (*DNShardRecord) GetLogShardID

func (m *DNShardRecord) GetLogShardID() uint64

func (*DNShardRecord) GetShardID

func (m *DNShardRecord) GetShardID() uint64

func (*DNShardRecord) Marshal

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

func (*DNShardRecord) MarshalTo

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

func (*DNShardRecord) MarshalToSizedBuffer

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

func (*DNShardRecord) ProtoMessage

func (*DNShardRecord) ProtoMessage()

func (*DNShardRecord) Reset

func (m *DNShardRecord) Reset()

func (*DNShardRecord) Size

func (m *DNShardRecord) Size() (n int)

func (*DNShardRecord) String

func (m *DNShardRecord) String() string

func (*DNShardRecord) Unmarshal

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

func (*DNShardRecord) XXX_DiscardUnknown

func (m *DNShardRecord) XXX_DiscardUnknown()

func (*DNShardRecord) XXX_Marshal

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

func (*DNShardRecord) XXX_Merge

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

func (*DNShardRecord) XXX_Size

func (m *DNShardRecord) XXX_Size() int

func (*DNShardRecord) XXX_Unmarshal

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

type DNStore added in v0.6.0

type DNStore struct {
	// UUID DNStore uuid id
	UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	// Shards DNShards
	Shards               []DNShard `protobuf:"bytes,2,rep,name=Shards,proto3" json:"Shards"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

DNStore DN store metadata

func (DNStore) DebugString added in v0.6.0

func (m DNStore) DebugString() string

DebugString returns debug string

func (*DNStore) Descriptor added in v0.6.0

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

func (*DNStore) GetShards added in v0.6.0

func (m *DNStore) GetShards() []DNShard

func (*DNStore) GetUUID added in v0.6.0

func (m *DNStore) GetUUID() string

func (*DNStore) Marshal added in v0.6.0

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

func (*DNStore) MarshalTo added in v0.6.0

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

func (*DNStore) MarshalToSizedBuffer added in v0.6.0

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

func (*DNStore) ProtoMessage added in v0.6.0

func (*DNStore) ProtoMessage()

func (*DNStore) Reset added in v0.6.0

func (m *DNStore) Reset()

func (*DNStore) Size added in v0.6.0

func (m *DNStore) Size() (n int)

func (*DNStore) String added in v0.6.0

func (m *DNStore) String() string

func (*DNStore) Unmarshal added in v0.6.0

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

func (*DNStore) XXX_DiscardUnknown added in v0.6.0

func (m *DNStore) XXX_DiscardUnknown()

func (*DNStore) XXX_Marshal added in v0.6.0

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

func (*DNStore) XXX_Merge added in v0.6.0

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

func (*DNStore) XXX_Size added in v0.6.0

func (m *DNStore) XXX_Size() int

func (*DNStore) XXX_Unmarshal added in v0.6.0

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

type LogShard added in v0.6.0

type LogShard struct {
	// LogShard extends LogShardRecord
	LogShardRecord `protobuf:"bytes,1,opt,name=LogShardRecord,proto3,embedded=LogShardRecord" json:"LogShardRecord"`
	// ReplicaID is the replica ID of the replica running on the LogStore.
	ReplicaID            uint64   `protobuf:"varint,2,opt,name=ReplicaID,proto3" json:"ReplicaID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogShard

func (*LogShard) Descriptor added in v0.6.0

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

func (*LogShard) GetReplicaID added in v0.6.0

func (m *LogShard) GetReplicaID() uint64

func (*LogShard) Marshal added in v0.6.0

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

func (*LogShard) MarshalTo added in v0.6.0

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

func (*LogShard) MarshalToSizedBuffer added in v0.6.0

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

func (*LogShard) ProtoMessage added in v0.6.0

func (*LogShard) ProtoMessage()

func (*LogShard) Reset added in v0.6.0

func (m *LogShard) Reset()

func (*LogShard) Size added in v0.6.0

func (m *LogShard) Size() (n int)

func (*LogShard) String added in v0.6.0

func (m *LogShard) String() string

func (*LogShard) Unmarshal added in v0.6.0

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

func (*LogShard) XXX_DiscardUnknown added in v0.6.0

func (m *LogShard) XXX_DiscardUnknown()

func (*LogShard) XXX_Marshal added in v0.6.0

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

func (*LogShard) XXX_Merge added in v0.6.0

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

func (*LogShard) XXX_Size added in v0.6.0

func (m *LogShard) XXX_Size() int

func (*LogShard) XXX_Unmarshal added in v0.6.0

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

type LogShardRecord

type LogShardRecord struct {
	// ShardID is the id of the Log Shard.
	ShardID uint64 `protobuf:"varint,1,opt,name=ShardID,proto3" json:"ShardID,omitempty"`
	// NumberOfReplicas is the number of replicas in the shard.
	NumberOfReplicas     uint64   `protobuf:"varint,2,opt,name=NumberOfReplicas,proto3" json:"NumberOfReplicas,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

LogShardRecord is Log Shard Metadata describing what is a Log shard. It is internally used by the HAKeeper to maintain how many Log shards are available in the system.

func (*LogShardRecord) Descriptor

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

func (*LogShardRecord) GetNumberOfReplicas

func (m *LogShardRecord) GetNumberOfReplicas() uint64

func (*LogShardRecord) GetShardID

func (m *LogShardRecord) GetShardID() uint64

func (*LogShardRecord) Marshal

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

func (*LogShardRecord) MarshalTo

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

func (*LogShardRecord) MarshalToSizedBuffer

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

func (*LogShardRecord) ProtoMessage

func (*LogShardRecord) ProtoMessage()

func (*LogShardRecord) Reset

func (m *LogShardRecord) Reset()

func (*LogShardRecord) Size

func (m *LogShardRecord) Size() (n int)

func (*LogShardRecord) String

func (m *LogShardRecord) String() string

func (*LogShardRecord) Unmarshal

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

func (*LogShardRecord) XXX_DiscardUnknown

func (m *LogShardRecord) XXX_DiscardUnknown()

func (*LogShardRecord) XXX_Marshal

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

func (*LogShardRecord) XXX_Merge

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

func (*LogShardRecord) XXX_Size

func (m *LogShardRecord) XXX_Size() int

func (*LogShardRecord) XXX_Unmarshal

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

type LogStore added in v0.6.0

type LogStore struct {
	// UUID is the id of the Log store.
	UUID string `protobuf:"bytes,1,opt,name=UUID,proto3" json:"UUID,omitempty"`
	// Shards is for Log shards metadata.
	Shards               []LogShard `protobuf:"bytes,2,rep,name=Shards,proto3" json:"Shards"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

LogStore is for the metadata for Log store.

func (*LogStore) Descriptor added in v0.6.0

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

func (*LogStore) GetShards added in v0.6.0

func (m *LogStore) GetShards() []LogShard

func (*LogStore) GetUUID added in v0.6.0

func (m *LogStore) GetUUID() string

func (*LogStore) Marshal added in v0.6.0

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

func (*LogStore) MarshalTo added in v0.6.0

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

func (*LogStore) MarshalToSizedBuffer added in v0.6.0

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

func (*LogStore) ProtoMessage added in v0.6.0

func (*LogStore) ProtoMessage()

func (*LogStore) Reset added in v0.6.0

func (m *LogStore) Reset()

func (*LogStore) Size added in v0.6.0

func (m *LogStore) Size() (n int)

func (*LogStore) String added in v0.6.0

func (m *LogStore) String() string

func (*LogStore) Unmarshal added in v0.6.0

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

func (*LogStore) XXX_DiscardUnknown added in v0.6.0

func (m *LogStore) XXX_DiscardUnknown()

func (*LogStore) XXX_Marshal added in v0.6.0

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

func (*LogStore) XXX_Merge added in v0.6.0

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

func (*LogStore) XXX_Size added in v0.6.0

func (m *LogStore) XXX_Size() int

func (*LogStore) XXX_Unmarshal added in v0.6.0

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

type ServiceType added in v0.7.0

type ServiceType int32

ServiceType service type

const (
	// CN cn service
	ServiceType_CN ServiceType = 0
	// DN dn service
	ServiceType_DN ServiceType = 1
	// LOG log service
	ServiceType_LOG ServiceType = 2
)

func (ServiceType) EnumDescriptor added in v0.7.0

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

func (ServiceType) String added in v0.7.0

func (x ServiceType) String() string

Jump to

Keyboard shortcuts

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