handler

package
v0.0.0-...-3f94a61 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExceptionHandler

type ExceptionHandler struct {
	Msg *SignalMsg
	Cli *client.Client
}

func (*ExceptionHandler) Handle

func (s *ExceptionHandler) Handle()

handle {}

type Handler

type Handler interface {
	Handle()
}

func NewHandler

func NewHandler(message []byte, cli *client.Client) (Handler, error)

func NewHandlerMsg

func NewHandlerMsg(signal SignalMsg, cli *client.Client) (Handler, error)

type HeartbeatHandler

type HeartbeatHandler struct {
	Cli *client.Client
}

func (*HeartbeatHandler) Handle

func (s *HeartbeatHandler) Handle()

type RejectHandler

type RejectHandler struct {
	Msg *SignalMsg
	Cli *client.Client
}

func (*RejectHandler) Handle

func (s *RejectHandler) Handle()

type SignalHandler

type SignalHandler struct {
	Msg *SignalMsg
	Cli *client.Client
}

func (*SignalHandler) Handle

func (s *SignalHandler) Handle()

type SignalMsg

type SignalMsg struct {
	Action   string      `json:"action"`
	ToPeerId string      `json:"to_peer_id,omitempty"`
	Data     interface{} `json:"data,omitempty"`
	Reason   string      `json:"reason,omitempty"`
}

type SignalResp

type SignalResp struct {
	Action     string      `json:"action"`
	FromPeerId string      `json:"from_peer_id,omitempty"`
	Data       interface{} `json:"data,omitempty"`
	Reason     string      `json:"reason,omitempty"`
}

type StatsHandler

type StatsHandler struct {
	Msg *SignalMsg
	Cli *client.Client
}

func (*StatsHandler) Handle

func (s *StatsHandler) Handle()

type TranxHandler

type TranxHandler struct {
	Msg *SignalMsg
	Cli *client.Client
}

func (*TranxHandler) Handle

func (s *TranxHandler) Handle()

Jump to

Keyboard shortcuts

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