channel

package
v0.0.0-...-a94f04b Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("request timeout")
)

Functions

func GetChannel

func GetChannel(config ChannelConfig) (rpc.Channel, error)

GetChannel creates a rpc.Channel according to config.Protocol

func RegistChannel

func RegistChannel(proto string, f func(config ChannelConfig) (rpc.Channel, error))

RegistChannel is set protocol

Types

type ChannelConfig

type ChannelConfig struct {
	Protocol string                 `json:"protocol"`
	Listener string                 `json:"listener"`
	Size     int                    `json:"size"`
	Ext      map[string]interface{} `json:"ext"`
}

ChannelConfig is Channel config

Jump to

Keyboard shortcuts

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