placementpb

package
v0.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 4 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
Shard
PlacementSnapshots

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 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 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"`
}

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) 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 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 []*Placement `protobuf:"bytes,1,rep,name=snapshots" json:"snapshots,omitempty"`
}

func (*PlacementSnapshots) Descriptor

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

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"`
}

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) 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