transport

package
v0.60.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientTLSConfig

func NewClientTLSConfig(certPath, keyPath, caPath, serverName string) (*tls.Config, error)

func NewRandomPrivateKey added in v0.53.0

func NewRandomPrivateKey() ([]byte, error)

func NewServerTLSConfig

func NewServerTLSConfig(certPath, keyPath, caPath string) (*tls.Config, error)

Types

type MessageTransporter added in v0.49.0

type MessageTransporter interface {
	Send(msg.Message) error
	// Recv(ctx context.Context, laneKey string, msgType string) (Message, error)
	// Do will first send msg, then recv msg with the same laneKey and specified msgType.
	Do(ctx context.Context, req msg.Message, laneKey, recvMsgType string) (msg.Message, error)
	// Dispatch will dispatch message to related channel registered in Do function by its message type and laneKey.
	Dispatch(m msg.Message, laneKey string) bool
	// Same with Dispatch but with specified message type.
	DispatchWithType(m msg.Message, msgType, laneKey string) bool
}

func NewMessageTransporter added in v0.49.0

func NewMessageTransporter(sendCh chan msg.Message) MessageTransporter

Jump to

Keyboard shortcuts

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