ctrl_msg

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CircuitSuccessType = 1001
	CircuitFailedType  = 1016
	RouteResultType    = 1022

	CircuitSuccessAddressHeader = 1100
	RouteResultAttemptHeader    = 1101
	RouteResultSuccessHeader    = 1102
	RouteResultErrorHeader      = 1103
	RouteResultErrorCodeHeader  = 1104

	TerminatorLocalAddressHeader  = 1110
	TerminatorRemoteAddressHeader = 1111

	InitiatorLocalAddressHeader  = 1112
	InitiatorRemoteAddressHeader = 1113

	ErrorTypeGeneric                 = 0
	ErrorTypeInvalidTerminator       = 1
	ErrorTypeMisconfiguredTerminator = 2
	ErrorTypeDialTimedOut            = 3
	ErrorTypeConnectionRefused       = 4

	CreateCircuitPeerDataHeader = 10

	CreateCircuitReqSessionTokenHeader         = 11
	CreateCircuitReqFingerprintsHeader         = 12
	CreateCircuitReqTerminatorInstanceIdHeader = 13

	CreateCircuitRespCircuitId  = 11
	CreateCircuitRespAddress    = 12
	CreateCircuitRespTagsHeader = 13

	HeaderResultErrorCode = 10

	ResultErrorRateLimited = 1
)

Variables

This section is empty.

Functions

func NewCircuitFailedMsg

func NewCircuitFailedMsg(message string) *channel.Message

func NewCircuitSuccessMsg

func NewCircuitSuccessMsg(sessionId, address string) *channel.Message

func NewRouteResultFailedMessage

func NewRouteResultFailedMessage(sessionId string, attempt int, rerr string) *channel.Message

func NewRouteResultSuccessMsg

func NewRouteResultSuccessMsg(sessionId string, attempt int) *channel.Message

Types

type CreateCircuitRequest added in v0.32.2

type CreateCircuitRequest struct {
	SessionToken         string
	Fingerprints         []string
	TerminatorInstanceId string
	PeerData             map[uint32][]byte
}

func DecodeCreateCircuitRequest added in v0.32.2

func DecodeCreateCircuitRequest(m *channel.Message) (*CreateCircuitRequest, error)

func (*CreateCircuitRequest) GetFingerprints added in v0.32.2

func (self *CreateCircuitRequest) GetFingerprints() []string

func (*CreateCircuitRequest) GetPeerData added in v0.32.2

func (self *CreateCircuitRequest) GetPeerData() map[uint32][]byte

func (*CreateCircuitRequest) GetSessionToken added in v0.32.2

func (self *CreateCircuitRequest) GetSessionToken() string

func (*CreateCircuitRequest) GetTerminatorInstanceId added in v0.32.2

func (self *CreateCircuitRequest) GetTerminatorInstanceId() string

func (*CreateCircuitRequest) ToMessage added in v0.32.2

func (self *CreateCircuitRequest) ToMessage() *channel.Message

type CreateCircuitResponse added in v0.32.2

type CreateCircuitResponse struct {
	CircuitId string
	Address   string
	PeerData  map[uint32][]byte
	Tags      map[string]string
}

func DecodeCreateCircuitResponse added in v0.32.2

func DecodeCreateCircuitResponse(m *channel.Message) (*CreateCircuitResponse, error)

func (*CreateCircuitResponse) ToMessage added in v0.32.2

func (self *CreateCircuitResponse) ToMessage() *channel.Message

Jump to

Keyboard shortcuts

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