controlpb

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package controlpb is a generated protocol buffer package.

It is generated from these files:

control.proto

It has these top-level messages:

Command
Node
Metrics
Unsubscribe
Disconnect

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthControl = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowControl   = fmt.Errorf("proto: integer overflow")
)
View Source
var MethodType_name = map[int32]string{
	0: "NODE",
	1: "UNSUBSCRIBE",
	2: "DISCONNECT",
}
View Source
var MethodType_value = map[string]int32{
	"NODE":        0,
	"UNSUBSCRIBE": 1,
	"DISCONNECT":  2,
}

Functions

This section is empty.

Types

type Command

type Command struct {
	UID    string     `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	Method MethodType `protobuf:"varint,2,opt,name=method,proto3,enum=controlpb.MethodType" json:"method"`
	Params Raw        `protobuf:"bytes,3,opt,name=params,proto3,customtype=Raw" json:"params"`
}

func NewPopulatedCommand

func NewPopulatedCommand(r randyControl, easy bool) *Command

func (*Command) Descriptor

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

func (*Command) Equal

func (this *Command) Equal(that interface{}) bool

func (*Command) GetMethod

func (m *Command) GetMethod() MethodType

func (*Command) GetUID

func (m *Command) GetUID() string

func (*Command) Marshal

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

func (*Command) MarshalTo

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

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) Reset

func (m *Command) Reset()

func (*Command) Size

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

func (*Command) String

func (m *Command) String() string

func (*Command) Unmarshal

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

type Disconnect

type Disconnect struct {
	User      string   `protobuf:"bytes,1,opt,name=user,proto3" json:"user"`
	Whitelist []string `protobuf:"bytes,2,rep,name=whitelist" json:"whitelist"`
	Code      uint32   `protobuf:"varint,3,opt,name=code,proto3" json:"code"`
	Reason    string   `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason"`
	Reconnect bool     `protobuf:"varint,5,opt,name=reconnect,proto3" json:"reconnect"`
}

func NewPopulatedDisconnect

func NewPopulatedDisconnect(r randyControl, easy bool) *Disconnect

func (*Disconnect) Descriptor

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

func (*Disconnect) Equal

func (this *Disconnect) Equal(that interface{}) bool

func (*Disconnect) GetCode

func (m *Disconnect) GetCode() uint32

func (*Disconnect) GetReason

func (m *Disconnect) GetReason() string

func (*Disconnect) GetReconnect

func (m *Disconnect) GetReconnect() bool

func (*Disconnect) GetUser

func (m *Disconnect) GetUser() string

func (*Disconnect) GetWhitelist

func (m *Disconnect) GetWhitelist() []string

func (*Disconnect) Marshal

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

func (*Disconnect) MarshalTo

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

func (*Disconnect) ProtoMessage

func (*Disconnect) ProtoMessage()

func (*Disconnect) Reset

func (m *Disconnect) Reset()

func (*Disconnect) Size

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

func (*Disconnect) String

func (m *Disconnect) String() string

func (*Disconnect) Unmarshal

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

type MethodType

type MethodType int32
const (
	MethodTypeNode        MethodType = 0
	MethodTypeUnsubscribe MethodType = 1
	MethodTypeDisconnect  MethodType = 2
)

func (MethodType) EnumDescriptor

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

func (MethodType) String

func (x MethodType) String() string

type Metrics

type Metrics struct {
	Interval float64            `protobuf:"fixed64,1,opt,name=interval,proto3" json:"interval"`
	Items    map[string]float64 `` /* 136-byte string literal not displayed */
}

func NewPopulatedMetrics

func NewPopulatedMetrics(r randyControl, easy bool) *Metrics

func (*Metrics) Descriptor

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

func (*Metrics) Equal

func (this *Metrics) Equal(that interface{}) bool

func (*Metrics) GetInterval

func (m *Metrics) GetInterval() float64

func (*Metrics) GetItems

func (m *Metrics) GetItems() map[string]float64

func (*Metrics) Marshal

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

func (*Metrics) MarshalTo

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

func (*Metrics) ProtoMessage

func (*Metrics) ProtoMessage()

func (*Metrics) Reset

func (m *Metrics) Reset()

func (*Metrics) Size

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

func (*Metrics) String

func (m *Metrics) String() string

func (*Metrics) Unmarshal

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

type Node

type Node struct {
	UID         string   `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	Name        string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
	Version     string   `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
	NumClients  uint32   `protobuf:"varint,4,opt,name=num_clients,json=numClients,proto3" json:"num_clients"`
	NumUsers    uint32   `protobuf:"varint,5,opt,name=num_users,json=numUsers,proto3" json:"num_users"`
	NumChannels uint32   `protobuf:"varint,6,opt,name=num_channels,json=numChannels,proto3" json:"num_channels"`
	Uptime      uint32   `protobuf:"varint,7,opt,name=uptime,proto3" json:"uptime"`
	Metrics     *Metrics `protobuf:"bytes,8,opt,name=metrics" json:"metrics"`
}

func NewPopulatedNode

func NewPopulatedNode(r randyControl, easy bool) *Node

func (*Node) Descriptor

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

func (*Node) Equal

func (this *Node) Equal(that interface{}) bool

func (*Node) GetMetrics

func (m *Node) GetMetrics() *Metrics

func (*Node) GetName

func (m *Node) GetName() string

func (*Node) GetNumChannels

func (m *Node) GetNumChannels() uint32

func (*Node) GetNumClients

func (m *Node) GetNumClients() uint32

func (*Node) GetNumUsers

func (m *Node) GetNumUsers() uint32

func (*Node) GetUID

func (m *Node) GetUID() string

func (*Node) GetUptime

func (m *Node) GetUptime() uint32

func (*Node) GetVersion

func (m *Node) GetVersion() string

func (*Node) Marshal

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

func (*Node) MarshalTo

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

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) Size

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

func (*Node) String

func (m *Node) String() string

func (*Node) Unmarshal

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

type Raw

type Raw []byte

Raw type used by Centrifuge protocol as a type for fields in structs which value we want to stay untouched. For example custom application specific JSON payload data in published message. This is very similar to json.RawMessage type but have some extra methods to fit gogo/protobuf custom type interface.

func NewPopulatedRaw

func NewPopulatedRaw(r intn) *Raw

NewPopulatedRaw required for gogoprotobuf custom type.

func (Raw) Compare

func (r Raw) Compare(other Raw) int

Compare exists to fit gogo/protobuf custom type interface.

func (Raw) Equal

func (r Raw) Equal(other Raw) bool

Equal exists to fit gogo/protobuf custom type interface.

func (Raw) Marshal

func (r Raw) Marshal() ([]byte, error)

Marshal encodes Raw to slice of bytes. Exists to fit gogo/protobuf custom type interface.

func (Raw) MarshalJSON

func (r Raw) MarshalJSON() ([]byte, error)

MarshalJSON returns *r as the JSON encoding of r.

func (Raw) MarshalTo

func (r Raw) MarshalTo(data []byte) (n int, err error)

MarshalTo exists to fit gogo/protobuf custom type interface.

func (*Raw) Size

func (r *Raw) Size() int

Size exists to fit gogo/protobuf custom type interface.

func (*Raw) Unmarshal

func (r *Raw) Unmarshal(data []byte) error

Unmarshal exists to fit gogo/protobuf custom type interface.

func (*Raw) UnmarshalJSON

func (r *Raw) UnmarshalJSON(data []byte) error

UnmarshalJSON sets *r to a copy of data.

type Unsubscribe

type Unsubscribe struct {
	Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel"`
	User    string `protobuf:"bytes,2,opt,name=user,proto3" json:"user"`
}

func NewPopulatedUnsubscribe

func NewPopulatedUnsubscribe(r randyControl, easy bool) *Unsubscribe

func (*Unsubscribe) Descriptor

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

func (*Unsubscribe) Equal

func (this *Unsubscribe) Equal(that interface{}) bool

func (*Unsubscribe) GetChannel

func (m *Unsubscribe) GetChannel() string

func (*Unsubscribe) GetUser

func (m *Unsubscribe) GetUser() string

func (*Unsubscribe) Marshal

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

func (*Unsubscribe) MarshalTo

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

func (*Unsubscribe) ProtoMessage

func (*Unsubscribe) ProtoMessage()

func (*Unsubscribe) Reset

func (m *Unsubscribe) Reset()

func (*Unsubscribe) Size

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

func (*Unsubscribe) String

func (m *Unsubscribe) String() string

func (*Unsubscribe) Unmarshal

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

Jump to

Keyboard shortcuts

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