msg

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Message_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "DATA",
		2: "STREAM_START",
		3: "STREAM_RESET",
		4: "SESSION_RESET",
	}
	Message_Type_value = map[string]int32{
		"UNKNOWN":       0,
		"DATA":          1,
		"STREAM_START":  2,
		"STREAM_RESET":  3,
		"SESSION_RESET": 4,
	}
)

Enum value maps for Message_Type.

View Source
var File_message_proto protoreflect.FileDescriptor

Functions

func WriteMessage

func WriteMessage(w io.Writer, m *Message) error

WriteMessage marshals the message and sends to the writer.

Types

type Message

type Message struct {
	Type      Message_Type `protobuf:"varint,1,opt,name=type,proto3,enum=msg.Message_Type" json:"type,omitempty"`
	StreamId  int32        `protobuf:"varint,2,opt,name=streamId,proto3" json:"streamId,omitempty"`
	Ignorable bool         `protobuf:"varint,3,opt,name=ignorable,proto3" json:"ignorable,omitempty"`
	Payload   []byte       `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetIgnorable

func (x *Message) GetIgnorable() bool

func (*Message) GetPayload

func (x *Message) GetPayload() []byte

func (*Message) GetStreamId

func (x *Message) GetStreamId() int32

func (*Message) GetType

func (x *Message) GetType() Message_Type

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Type

type Message_Type int32
const (
	Message_UNKNOWN       Message_Type = 0
	Message_DATA          Message_Type = 1
	Message_STREAM_START  Message_Type = 2
	Message_STREAM_RESET  Message_Type = 3
	Message_SESSION_RESET Message_Type = 4
)

func (Message_Type) Descriptor

func (Message_Type) Enum

func (x Message_Type) Enum() *Message_Type

func (Message_Type) EnumDescriptor deprecated

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

Deprecated: Use Message_Type.Descriptor instead.

func (Message_Type) Number

func (Message_Type) String

func (x Message_Type) String() string

func (Message_Type) Type

Jump to

Keyboard shortcuts

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