protocol

package
v1.23.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeUnknown = MessageType("__message_type_unknown")
	TypeUnknown        = Type("__protocol_type_unknown")
)

Variables

This section is empty.

Functions

func Identify

func Identify(msg *protocolpb.Message) (Type, MessageType, error)

Identify is a function that given a protocol message gives the specific message type of the body and the type of the protocol to which this message belongs.

func IdentifyOrUnknown

func IdentifyOrUnknown(msg *protocolpb.Message) (Type, MessageType)

IdentifyOrUnknown wraps Identify to return TypeUnknown and/or MessageTypeUnknown in the case where either one cannot be determined due to an error.

Types

type MessageType

type MessageType string

MessageType is the type of a message within a protocol.

func (MessageType) String

func (mt MessageType) String() string

String transforms a MessageType into a string

type Type

type Type string

Type is a protocol type of which there may be many instances like the update protocol or the query protocol.

func (Type) String

func (pt Type) String() string

String tranforms a Type into a string

Jump to

Keyboard shortcuts

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