placementpb

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 23

Documentation

Overview

Package placementpb is a generated protocol buffer package.

It is generated from these files:

github.com/m3db/m3/src/cluster/generated/proto/placementpb/placement.proto

It has these top-level messages:

Placement
Instance
InstanceMetadata
Shard
PlacementSnapshots
Options

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthPlacement = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPlacement   = fmt.Errorf("proto: integer overflow")
)
View Source
var CompressMode_name = map[int32]string{
	0: "NONE",
	1: "ZSTD",
}
View Source
var CompressMode_value = map[string]int32{
	"NONE": 0,
	"ZSTD": 1,
}
View Source
var ShardState_name = map[int32]string{
	0: "INITIALIZING",
	1: "AVAILABLE",
	2: "LEAVING",
}
View Source
var ShardState_value = map[string]int32{
	"INITIALIZING": 0,
	"AVAILABLE":    1,
	"LEAVING":      2,
}

Functions

This section is empty.

Types

type CompressMode added in v1.2.0

type CompressMode int32
const (
	CompressMode_NONE CompressMode = 0
	CompressMode_ZSTD CompressMode = 1
)

func (CompressMode) EnumDescriptor added in v1.2.0

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

func (CompressMode) String added in v1.2.0

func (x CompressMode) String() string

type Instance

type Instance struct {
	Id             string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	IsolationGroup string            `protobuf:"bytes,2,opt,name=isolation_group,json=isolationGroup,proto3" json:"isolation_group,omitempty"`
	Zone           string            `protobuf:"bytes,3,opt,name=zone,proto3" json:"zone,omitempty"`
	Weight         uint32            `protobuf:"varint,4,opt,name=weight,proto3" json:"weight,omitempty"`
	Endpoint       string            `protobuf:"bytes,5,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	Shards         []*Shard          `protobuf:"bytes,6,rep,name=shards" json:"shards,omitempty"`
	ShardSetId     uint32            `protobuf:"varint,7,opt,name=shard_set_id,json=shardSetId,proto3" json:"shard_set_id,omitempty"`
	Hostname       string            `protobuf:"bytes,8,opt,name=hostname,proto3" json:"hostname,omitempty"`
	Port           uint32            `protobuf:"varint,9,opt,name=port,proto3" json:"port,omitempty"`
	Metadata       *InstanceMetadata `protobuf:"bytes,10,opt,name=metadata" json:"metadata,omitempty"`
}

func (*Instance) Descriptor

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

func (*Instance) GetEndpoint

func (m *Instance) GetEndpoint() string

func (*Instance) GetHostname

func (m *Instance) GetHostname() string

func (*Instance) GetId

func (m *Instance) GetId() string

func (*Instance) GetIsolationGroup

func (m *Instance) GetIsolationGroup() string

func (*Instance) GetMetadata added in v0.15.0

func (m *Instance) GetMetadata() *InstanceMetadata

func (*Instance) GetPort

func (m *Instance) GetPort() uint32

func (*Instance) GetShardSetId

func (m *Instance) GetShardSetId() uint32

func (*Instance) GetShards

func (m *Instance) GetShards() []*Shard

func (*Instance) GetWeight

func (m *Instance) GetWeight() uint32

func (*Instance) GetZone

func (m *Instance) GetZone() string

func (*Instance) Marshal

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

func (*Instance) MarshalTo

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

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) Reset

func (m *Instance) Reset()

func (*Instance) Size

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

func (*Instance) String

func (m *Instance) String() string

func (*Instance) Unmarshal

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

type InstanceMetadata added in v0.15.0

type InstanceMetadata struct {
	DebugPort uint32 `protobuf:"varint,1,opt,name=debug_port,json=debugPort,proto3" json:"debug_port,omitempty"`
}

func (*InstanceMetadata) Descriptor added in v0.15.0

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

func (*InstanceMetadata) GetDebugPort added in v0.15.0

func (m *InstanceMetadata) GetDebugPort() uint32

func (*InstanceMetadata) Marshal added in v0.15.0

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

func (*InstanceMetadata) MarshalTo added in v0.15.0

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

func (*InstanceMetadata) ProtoMessage added in v0.15.0

func (*InstanceMetadata) ProtoMessage()

func (*InstanceMetadata) Reset added in v0.15.0

func (m *InstanceMetadata) Reset()

func (*InstanceMetadata) Size added in v0.15.0

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

func (*InstanceMetadata) String added in v0.15.0

func (m *InstanceMetadata) String() string

func (*InstanceMetadata) Unmarshal added in v0.15.0

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

type Options added in v1.2.0

type Options struct {
	IsSharded         *google_protobuf.BoolValue `protobuf:"bytes,1,opt,name=is_sharded,json=isSharded" json:"is_sharded,omitempty"`
	SkipPortMirroring *google_protobuf.BoolValue `protobuf:"bytes,2,opt,name=skip_port_mirroring,json=skipPortMirroring" json:"skip_port_mirroring,omitempty"`
}

func (*Options) Descriptor added in v1.2.0

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

func (*Options) GetIsSharded added in v1.2.0

func (m *Options) GetIsSharded() *google_protobuf.BoolValue

func (*Options) GetSkipPortMirroring added in v1.4.0

func (m *Options) GetSkipPortMirroring() *google_protobuf.BoolValue

func (*Options) Marshal added in v1.2.0

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

func (*Options) MarshalTo added in v1.2.0

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

func (*Options) ProtoMessage added in v1.2.0

func (*Options) ProtoMessage()

func (*Options) Reset added in v1.2.0

func (m *Options) Reset()

func (*Options) Size added in v1.2.0

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

func (*Options) String added in v1.2.0

func (m *Options) String() string

func (*Options) Unmarshal added in v1.2.0

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

type Placement

type Placement struct {
	Instances     map[string]*Instance `` /* 145-byte string literal not displayed */
	ReplicaFactor uint32               `protobuf:"varint,2,opt,name=replica_factor,json=replicaFactor,proto3" json:"replica_factor,omitempty"`
	NumShards     uint32               `protobuf:"varint,3,opt,name=num_shards,json=numShards,proto3" json:"num_shards,omitempty"`
	IsSharded     bool                 `protobuf:"varint,4,opt,name=is_sharded,json=isSharded,proto3" json:"is_sharded,omitempty"`
	// cutover_time is the placement-level cutover time and determines when the clients
	// watching the placement deems the placement as "in effect" and can use it to determine
	// shard placement.
	CutoverTime int64 `protobuf:"varint,5,opt,name=cutover_time,json=cutoverTime,proto3" json:"cutover_time,omitempty"`
	IsMirrored  bool  `protobuf:"varint,6,opt,name=is_mirrored,json=isMirrored,proto3" json:"is_mirrored,omitempty"`
	// max_shard_set_id stores the maximum shard set id used to guarantee unique
	// shard set id generations across placement changes.
	MaxShardSetId uint32 `protobuf:"varint,7,opt,name=max_shard_set_id,json=maxShardSetId,proto3" json:"max_shard_set_id,omitempty"`
}

func (*Placement) Descriptor

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

func (*Placement) GetCutoverTime

func (m *Placement) GetCutoverTime() int64

func (*Placement) GetInstances

func (m *Placement) GetInstances() map[string]*Instance

func (*Placement) GetIsMirrored

func (m *Placement) GetIsMirrored() bool

func (*Placement) GetIsSharded

func (m *Placement) GetIsSharded() bool

func (*Placement) GetMaxShardSetId

func (m *Placement) GetMaxShardSetId() uint32

func (*Placement) GetNumShards

func (m *Placement) GetNumShards() uint32

func (*Placement) GetReplicaFactor

func (m *Placement) GetReplicaFactor() uint32

func (*Placement) Marshal

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

func (*Placement) MarshalTo

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

func (*Placement) ProtoMessage

func (*Placement) ProtoMessage()

func (*Placement) Reset

func (m *Placement) Reset()

func (*Placement) Size

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

func (*Placement) String

func (m *Placement) String() string

func (*Placement) Unmarshal

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

type PlacementSnapshots

type PlacementSnapshots struct {
	// snapshots field is used only when compress_mode == NONE.
	Snapshots           []*Placement `protobuf:"bytes,1,rep,name=snapshots" json:"snapshots,omitempty"`
	CompressMode        CompressMode `` /* 128-byte string literal not displayed */
	CompressedPlacement []byte       `protobuf:"bytes,3,opt,name=compressed_placement,json=compressedPlacement,proto3" json:"compressed_placement,omitempty"`
}

func (*PlacementSnapshots) Descriptor

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

func (*PlacementSnapshots) GetCompressMode added in v1.2.0

func (m *PlacementSnapshots) GetCompressMode() CompressMode

func (*PlacementSnapshots) GetCompressedPlacement added in v1.2.0

func (m *PlacementSnapshots) GetCompressedPlacement() []byte

func (*PlacementSnapshots) GetSnapshots

func (m *PlacementSnapshots) GetSnapshots() []*Placement

func (*PlacementSnapshots) Marshal

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

func (*PlacementSnapshots) MarshalTo

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

func (*PlacementSnapshots) ProtoMessage

func (*PlacementSnapshots) ProtoMessage()

func (*PlacementSnapshots) Reset

func (m *PlacementSnapshots) Reset()

func (*PlacementSnapshots) Size

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

func (*PlacementSnapshots) String

func (m *PlacementSnapshots) String() string

func (*PlacementSnapshots) Unmarshal

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

type Shard

type Shard struct {
	Id       uint32     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	State    ShardState `protobuf:"varint,2,opt,name=state,proto3,enum=placementpb.ShardState" json:"state,omitempty"`
	SourceId string     `protobuf:"bytes,3,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
	// Shard-level cutover and cutoff times determine when the shards have been cut over or
	// cut off from the source instance to the destination instance. The placement-level
	// cutover times are usually (but not required to be) earlier than shard-level cutover
	// times if the clients watching the placement need to send traffic to the shards before
	// they are ready to cut over or after they are ready to cut off (e.g., for warmup purposes).
	CutoverNanos int64 `protobuf:"varint,4,opt,name=cutover_nanos,json=cutoverNanos,proto3" json:"cutover_nanos,omitempty"`
	CutoffNanos  int64 `protobuf:"varint,5,opt,name=cutoff_nanos,json=cutoffNanos,proto3" json:"cutoff_nanos,omitempty"`
	// redirect_to_shard_id is used during resharding process.
	// If set, all the incoming writes will be redirected to the specified shard.
	RedirectToShardId *google_protobuf.UInt32Value `protobuf:"bytes,6,opt,name=redirect_to_shard_id,json=redirectToShardId" json:"redirect_to_shard_id,omitempty"`
}

func (*Shard) Descriptor

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

func (*Shard) GetCutoffNanos

func (m *Shard) GetCutoffNanos() int64

func (*Shard) GetCutoverNanos

func (m *Shard) GetCutoverNanos() int64

func (*Shard) GetId

func (m *Shard) GetId() uint32

func (*Shard) GetRedirectToShardId added in v1.2.0

func (m *Shard) GetRedirectToShardId() *google_protobuf.UInt32Value

func (*Shard) GetSourceId

func (m *Shard) GetSourceId() string

func (*Shard) GetState

func (m *Shard) GetState() ShardState

func (*Shard) Marshal

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

func (*Shard) MarshalTo

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

func (*Shard) ProtoMessage

func (*Shard) ProtoMessage()

func (*Shard) Reset

func (m *Shard) Reset()

func (*Shard) Size

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

func (*Shard) String

func (m *Shard) String() string

func (*Shard) Unmarshal

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

type ShardState

type ShardState int32
const (
	ShardState_INITIALIZING ShardState = 0
	ShardState_AVAILABLE    ShardState = 1
	ShardState_LEAVING      ShardState = 2
)

func (ShardState) EnumDescriptor

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

func (ShardState) String

func (x ShardState) String() string

Jump to

Keyboard shortcuts

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