cmd_pb

package
v0.21.24 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CommandType_name = map[int32]string{
		0: "Zero",
		1: "CreateEntityType",
		2: "UpdateEntityType",
		3: "DeleteEntityType",
		4: "SyncSnapshot",
	}
	CommandType_value = map[string]int32{
		"Zero":             0,
		"CreateEntityType": 1,
		"UpdateEntityType": 2,
		"DeleteEntityType": 3,
		"SyncSnapshot":     4,
	}
)

Enum value maps for CommandType.

Functions

func DecodeTags

func DecodeTags(tags map[string]*TagValue) map[string]interface{}

func EncodeProtobuf

func EncodeProtobuf(v TypedMessage) ([]byte, error)

EncodeProtobuf returns the encoded message, prefixed with the command type

func EncodeTags

func EncodeTags(tags map[string]interface{}) (map[string]*TagValue, error)

Types

type CommandType

type CommandType int32
const (
	CommandType_Zero             CommandType = 0
	CommandType_CreateEntityType CommandType = 1
	CommandType_UpdateEntityType CommandType = 2
	CommandType_DeleteEntityType CommandType = 3
	CommandType_SyncSnapshot     CommandType = 4
)

func (CommandType) Descriptor

func (CommandType) Enum

func (x CommandType) Enum() *CommandType

func (CommandType) EnumDescriptor deprecated

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

Deprecated: Use CommandType.Descriptor instead.

func (CommandType) Number

func (x CommandType) Number() protoreflect.EnumNumber

func (CommandType) String

func (x CommandType) String() string

func (CommandType) Type

type CreateEntityCommand

type CreateEntityCommand struct {
	EntityType string `protobuf:"bytes,1,opt,name=entityType,proto3" json:"entityType,omitempty"`
	EntityData []byte `protobuf:"bytes,2,opt,name=entityData,proto3" json:"entityData,omitempty"`
	Flags      uint32 `protobuf:"varint,3,opt,name=flags,proto3" json:"flags,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateEntityCommand) Descriptor deprecated

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

Deprecated: Use CreateEntityCommand.ProtoReflect.Descriptor instead.

func (*CreateEntityCommand) GetCommandType

func (x *CreateEntityCommand) GetCommandType() int32

func (*CreateEntityCommand) GetEntityData

func (x *CreateEntityCommand) GetEntityData() []byte

func (*CreateEntityCommand) GetEntityType

func (x *CreateEntityCommand) GetEntityType() string

func (*CreateEntityCommand) GetFlags added in v0.19.31

func (x *CreateEntityCommand) GetFlags() uint32

func (*CreateEntityCommand) ProtoMessage

func (*CreateEntityCommand) ProtoMessage()

func (*CreateEntityCommand) ProtoReflect

func (x *CreateEntityCommand) ProtoReflect() protoreflect.Message

func (*CreateEntityCommand) Reset

func (x *CreateEntityCommand) Reset()

func (*CreateEntityCommand) String

func (x *CreateEntityCommand) String() string

type DeleteEntityCommand

type DeleteEntityCommand struct {
	EntityId   string `protobuf:"bytes,1,opt,name=entityId,proto3" json:"entityId,omitempty"`
	EntityType string `protobuf:"bytes,2,opt,name=entityType,proto3" json:"entityType,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteEntityCommand) Descriptor deprecated

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

Deprecated: Use DeleteEntityCommand.ProtoReflect.Descriptor instead.

func (*DeleteEntityCommand) GetCommandType

func (x *DeleteEntityCommand) GetCommandType() int32

func (*DeleteEntityCommand) GetEntityId

func (x *DeleteEntityCommand) GetEntityId() string

func (*DeleteEntityCommand) GetEntityType

func (x *DeleteEntityCommand) GetEntityType() string

func (*DeleteEntityCommand) ProtoMessage

func (*DeleteEntityCommand) ProtoMessage()

func (*DeleteEntityCommand) ProtoReflect

func (x *DeleteEntityCommand) ProtoReflect() protoreflect.Message

func (*DeleteEntityCommand) Reset

func (x *DeleteEntityCommand) Reset()

func (*DeleteEntityCommand) String

func (x *DeleteEntityCommand) String() string

type Router

type Router struct {
	Id          string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Fingerprint []byte               `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	Cost        uint32               `protobuf:"varint,4,opt,name=cost,proto3" json:"cost,omitempty"`
	NoTraversal bool                 `protobuf:"varint,5,opt,name=noTraversal,proto3" json:"noTraversal,omitempty"`
	Tags        map[string]*TagValue `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Router) Descriptor deprecated

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

Deprecated: Use Router.ProtoReflect.Descriptor instead.

func (*Router) GetCost

func (x *Router) GetCost() uint32

func (*Router) GetFingerprint

func (x *Router) GetFingerprint() []byte

func (*Router) GetId

func (x *Router) GetId() string

func (*Router) GetName

func (x *Router) GetName() string

func (*Router) GetNoTraversal

func (x *Router) GetNoTraversal() bool

func (*Router) GetTags

func (x *Router) GetTags() map[string]*TagValue

func (*Router) ProtoMessage

func (*Router) ProtoMessage()

func (*Router) ProtoReflect

func (x *Router) ProtoReflect() protoreflect.Message

func (*Router) Reset

func (x *Router) Reset()

func (*Router) String

func (x *Router) String() string

type Service

type Service struct {
	Id                 string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name               string               `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	TerminatorStrategy string               `protobuf:"bytes,3,opt,name=terminatorStrategy,proto3" json:"terminatorStrategy,omitempty"`
	Tags               map[string]*TagValue `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetId

func (x *Service) GetId() string

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetTags

func (x *Service) GetTags() map[string]*TagValue

func (*Service) GetTerminatorStrategy

func (x *Service) GetTerminatorStrategy() string

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

func (x *Service) ProtoReflect() protoreflect.Message

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

type SyncSnapshotCommand added in v0.19.48

type SyncSnapshotCommand struct {
	SnapshotId string `protobuf:"bytes,1,opt,name=snapshotId,proto3" json:"snapshotId,omitempty"`
	Snapshot   []byte `protobuf:"bytes,2,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncSnapshotCommand) Descriptor deprecated added in v0.19.48

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

Deprecated: Use SyncSnapshotCommand.ProtoReflect.Descriptor instead.

func (*SyncSnapshotCommand) GetCommandType added in v0.19.48

func (x *SyncSnapshotCommand) GetCommandType() int32

func (*SyncSnapshotCommand) GetSnapshot added in v0.19.48

func (x *SyncSnapshotCommand) GetSnapshot() []byte

func (*SyncSnapshotCommand) GetSnapshotId added in v0.19.48

func (x *SyncSnapshotCommand) GetSnapshotId() string

func (*SyncSnapshotCommand) ProtoMessage added in v0.19.48

func (*SyncSnapshotCommand) ProtoMessage()

func (*SyncSnapshotCommand) ProtoReflect added in v0.19.48

func (x *SyncSnapshotCommand) ProtoReflect() protoreflect.Message

func (*SyncSnapshotCommand) Reset added in v0.19.48

func (x *SyncSnapshotCommand) Reset()

func (*SyncSnapshotCommand) String added in v0.19.48

func (x *SyncSnapshotCommand) String() string

type TagValue

type TagValue struct {

	// Types that are assignable to Value:
	//	*TagValue_BoolValue
	//	*TagValue_StringValue
	//	*TagValue_FpValue
	//	*TagValue_NilValue
	Value isTagValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*TagValue) Descriptor deprecated

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

Deprecated: Use TagValue.ProtoReflect.Descriptor instead.

func (*TagValue) GetBoolValue

func (x *TagValue) GetBoolValue() bool

func (*TagValue) GetFpValue

func (x *TagValue) GetFpValue() float64

func (*TagValue) GetNilValue

func (x *TagValue) GetNilValue() bool

func (*TagValue) GetStringValue

func (x *TagValue) GetStringValue() string

func (*TagValue) GetValue

func (m *TagValue) GetValue() isTagValue_Value

func (*TagValue) ProtoMessage

func (*TagValue) ProtoMessage()

func (*TagValue) ProtoReflect

func (x *TagValue) ProtoReflect() protoreflect.Message

func (*TagValue) Reset

func (x *TagValue) Reset()

func (*TagValue) String

func (x *TagValue) String() string

type TagValue_BoolValue

type TagValue_BoolValue struct {
	BoolValue bool `protobuf:"varint,1,opt,name=boolValue,proto3,oneof"`
}

type TagValue_FpValue

type TagValue_FpValue struct {
	FpValue float64 `protobuf:"fixed64,3,opt,name=fpValue,proto3,oneof"`
}

type TagValue_NilValue

type TagValue_NilValue struct {
	NilValue bool `protobuf:"varint,4,opt,name=nilValue,proto3,oneof"`
}

type TagValue_StringValue

type TagValue_StringValue struct {
	StringValue string `protobuf:"bytes,2,opt,name=stringValue,proto3,oneof"`
}

type Terminator

type Terminator struct {
	Id             string               `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	ServiceId      string               `protobuf:"bytes,2,opt,name=serviceId,proto3" json:"serviceId,omitempty"`
	RouterId       string               `protobuf:"bytes,3,opt,name=routerId,proto3" json:"routerId,omitempty"`
	Binding        string               `protobuf:"bytes,4,opt,name=binding,proto3" json:"binding,omitempty"`
	Address        string               `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"`
	InstanceId     string               `protobuf:"bytes,6,opt,name=instanceId,proto3" json:"instanceId,omitempty"`
	InstanceSecret []byte               `protobuf:"bytes,7,opt,name=instanceSecret,proto3" json:"instanceSecret,omitempty"`
	Cost           uint32               `protobuf:"varint,8,opt,name=cost,proto3" json:"cost,omitempty"`
	Precedence     uint32               `protobuf:"varint,9,opt,name=precedence,proto3" json:"precedence,omitempty"`
	PeerData       map[uint32][]byte    `` /* 159-byte string literal not displayed */
	Tags           map[string]*TagValue `` /* 150-byte string literal not displayed */
	HostId         string               `protobuf:"bytes,12,opt,name=hostId,proto3" json:"hostId,omitempty"`
	// contains filtered or unexported fields
}

func (*Terminator) Descriptor deprecated

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

Deprecated: Use Terminator.ProtoReflect.Descriptor instead.

func (*Terminator) GetAddress

func (x *Terminator) GetAddress() string

func (*Terminator) GetBinding

func (x *Terminator) GetBinding() string

func (*Terminator) GetCost

func (x *Terminator) GetCost() uint32

func (*Terminator) GetHostId added in v0.19.23

func (x *Terminator) GetHostId() string

func (*Terminator) GetId

func (x *Terminator) GetId() string

func (*Terminator) GetInstanceId added in v0.19.0

func (x *Terminator) GetInstanceId() string

func (*Terminator) GetInstanceSecret added in v0.19.0

func (x *Terminator) GetInstanceSecret() []byte

func (*Terminator) GetPeerData

func (x *Terminator) GetPeerData() map[uint32][]byte

func (*Terminator) GetPrecedence

func (x *Terminator) GetPrecedence() uint32

func (*Terminator) GetRouterId

func (x *Terminator) GetRouterId() string

func (*Terminator) GetServiceId

func (x *Terminator) GetServiceId() string

func (*Terminator) GetTags

func (x *Terminator) GetTags() map[string]*TagValue

func (*Terminator) ProtoMessage

func (*Terminator) ProtoMessage()

func (*Terminator) ProtoReflect

func (x *Terminator) ProtoReflect() protoreflect.Message

func (*Terminator) Reset

func (x *Terminator) Reset()

func (*Terminator) String

func (x *Terminator) String() string

type TypedMessage

type TypedMessage interface {
	proto.Message
	GetCommandType() int32
}

TypedMessage instances are protobuf messages which know their command type

type UpdateEntityCommand

type UpdateEntityCommand struct {
	EntityType    string   `protobuf:"bytes,1,opt,name=entityType,proto3" json:"entityType,omitempty"`
	EntityData    []byte   `protobuf:"bytes,2,opt,name=entityData,proto3" json:"entityData,omitempty"`
	UpdatedFields []string `protobuf:"bytes,3,rep,name=updatedFields,proto3" json:"updatedFields,omitempty"`
	Flags         uint32   `protobuf:"varint,4,opt,name=flags,proto3" json:"flags,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateEntityCommand) Descriptor deprecated

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

Deprecated: Use UpdateEntityCommand.ProtoReflect.Descriptor instead.

func (*UpdateEntityCommand) GetCommandType

func (x *UpdateEntityCommand) GetCommandType() int32

func (*UpdateEntityCommand) GetEntityData

func (x *UpdateEntityCommand) GetEntityData() []byte

func (*UpdateEntityCommand) GetEntityType

func (x *UpdateEntityCommand) GetEntityType() string

func (*UpdateEntityCommand) GetFlags added in v0.19.31

func (x *UpdateEntityCommand) GetFlags() uint32

func (*UpdateEntityCommand) GetUpdatedFields

func (x *UpdateEntityCommand) GetUpdatedFields() []string

func (*UpdateEntityCommand) ProtoMessage

func (*UpdateEntityCommand) ProtoMessage()

func (*UpdateEntityCommand) ProtoReflect

func (x *UpdateEntityCommand) ProtoReflect() protoreflect.Message

func (*UpdateEntityCommand) Reset

func (x *UpdateEntityCommand) Reset()

func (*UpdateEntityCommand) String

func (x *UpdateEntityCommand) String() string

Jump to

Keyboard shortcuts

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