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 ¶
- Variables
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)
- func (m *Instance) GetEndpoint() string
- func (m *Instance) GetHostname() string
- func (m *Instance) GetId() string
- func (m *Instance) GetIsolationGroup() string
- func (m *Instance) GetPort() uint32
- func (m *Instance) GetShardSetId() uint32
- func (m *Instance) GetShards() []*Shard
- func (m *Instance) GetWeight() uint32
- func (m *Instance) GetZone() string
- func (m *Instance) Marshal() (dAtA []byte, err error)
- func (m *Instance) MarshalTo(dAtA []byte) (int, error)
- func (*Instance) ProtoMessage()
- func (m *Instance) Reset()
- func (m *Instance) Size() (n int)
- func (m *Instance) String() string
- func (m *Instance) Unmarshal(dAtA []byte) error
- type Placement
- func (*Placement) Descriptor() ([]byte, []int)
- func (m *Placement) GetCutoverTime() int64
- func (m *Placement) GetInstances() map[string]*Instance
- func (m *Placement) GetIsMirrored() bool
- func (m *Placement) GetIsSharded() bool
- func (m *Placement) GetMaxShardSetId() uint32
- func (m *Placement) GetNumShards() uint32
- func (m *Placement) GetReplicaFactor() uint32
- func (m *Placement) Marshal() (dAtA []byte, err error)
- func (m *Placement) MarshalTo(dAtA []byte) (int, error)
- func (*Placement) ProtoMessage()
- func (m *Placement) Reset()
- func (m *Placement) Size() (n int)
- func (m *Placement) String() string
- func (m *Placement) Unmarshal(dAtA []byte) error
- type PlacementSnapshots
- func (*PlacementSnapshots) Descriptor() ([]byte, []int)
- func (m *PlacementSnapshots) GetSnapshots() []*Placement
- func (m *PlacementSnapshots) Marshal() (dAtA []byte, err error)
- func (m *PlacementSnapshots) MarshalTo(dAtA []byte) (int, error)
- func (*PlacementSnapshots) ProtoMessage()
- func (m *PlacementSnapshots) Reset()
- func (m *PlacementSnapshots) Size() (n int)
- func (m *PlacementSnapshots) String() string
- func (m *PlacementSnapshots) Unmarshal(dAtA []byte) error
- type Shard
- func (*Shard) Descriptor() ([]byte, []int)
- func (m *Shard) GetCutoffNanos() int64
- func (m *Shard) GetCutoverNanos() int64
- func (m *Shard) GetId() uint32
- func (m *Shard) GetSourceId() string
- func (m *Shard) GetState() ShardState
- func (m *Shard) Marshal() (dAtA []byte, err error)
- func (m *Shard) MarshalTo(dAtA []byte) (int, error)
- func (*Shard) ProtoMessage()
- func (m *Shard) Reset()
- func (m *Shard) Size() (n int)
- func (m *Shard) String() string
- func (m *Shard) Unmarshal(dAtA []byte) error
- type ShardState
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) GetEndpoint ¶
func (*Instance) GetHostname ¶
func (*Instance) GetIsolationGroup ¶
func (*Instance) GetShardSetId ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
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) GetCutoverTime ¶
func (*Placement) GetInstances ¶
func (*Placement) GetIsMirrored ¶
func (*Placement) GetIsSharded ¶
func (*Placement) GetMaxShardSetId ¶
func (*Placement) GetNumShards ¶
func (*Placement) GetReplicaFactor ¶
func (*Placement) ProtoMessage ¶
func (*Placement) ProtoMessage()
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) GetCutoffNanos ¶
func (*Shard) GetCutoverNanos ¶
func (*Shard) GetSourceId ¶
func (*Shard) GetState ¶
func (m *Shard) GetState() ShardState
func (*Shard) ProtoMessage ¶
func (*Shard) ProtoMessage()
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
Click to show internal directories.
Click to hide internal directories.