protocol

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCommandMessage

func NewCommandMessage(env *common.SessionEnv, command string, channel string, identifiers string, data string) *pb.CommandMessage

NewCommandMessage builds a command RPC payload from the session env, command and channel names, and connection identifiers

func NewConnectMessage

func NewConnectMessage(env *common.SessionEnv) *pb.ConnectionRequest

NewConnectMessage builds a connect RPC payload from the session env

func NewDisconnectMessage

func NewDisconnectMessage(env *common.SessionEnv, identifiers string, subscriptions []string) *pb.DisconnectRequest

NewDisconnectMessage builds a disconnect RPC payload from the session env, connection identifiers and subscriptions

func ParseCommandResponse

func ParseCommandResponse(response *pb.CommandResponse) (*common.CommandResult, error)

ParseCommandResponse takes protobuf CommandResponse struct and converts into common.CommandResult and/or error

func ParseConnectResponse

func ParseConnectResponse(response *pb.ConnectionResponse) (*common.ConnectResult, error)

ParseConnectResponse takes protobuf ConnectionResponse struct and converts into common.ConnectResult and/or error

func ParseDisconnectResponse

func ParseDisconnectResponse(response *pb.DisconnectResponse) error

ParseDisconnectResponse takes protobuf DisconnectResponse struct and return error if any

Types

This section is empty.

Jump to

Keyboard shortcuts

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