Documentation ¶
Index ¶
- Variables
- func GRPCClientSettingsValidator(settings map[string]interface{}) (interface{}, error)
- func GRPCServerSettingsValidator(settings map[string]interface{}) (interface{}, error)
- func JSONRPCClientSettingsValidator(settings map[string]interface{}) (interface{}, error)
- func JSONRPCServerSettingsValidator(settings map[string]interface{}) (interface{}, error)
- func MakeGRPCClientChannel(settings interface{}) (hyper.Channel, error)
- func MakeGRPCServerChannel(settings interface{}) (hyper.Channel, error)
- func MakeJSONRPCClientChannel(settings interface{}) (hyper.Channel, error)
- func MakeJSONRPCServerChannel(settings interface{}) (hyper.Channel, error)
- func MakeQUICChannel(settings interface{}) (hyper.Channel, error)
- func MakeStdoutChannel(settings interface{}) (hyper.Channel, error)
- func QUICSettingsValidator(settings map[string]interface{}) (interface{}, error)
- func StdoutSettingsValidator(settings map[string]interface{}) (interface{}, error)
- type GRPCClientChannel
- func (c *GRPCClientChannel) CanDeliverTo(address *hyper.Address) bool
- func (c *GRPCClientChannel) Close() error
- func (c *GRPCClientChannel) DeliverRequest(request *hyper.Request) (*hyper.Response, error)
- func (c *GRPCClientChannel) HandleRequest(request *hyper.Request, clientInfo *hyper.ClientInfo) (*hyper.Response, error)
- func (c *GRPCClientChannel) Open() error
- func (c *GRPCClientChannel) Type() string
- type GRPCServerChannel
- func (c *GRPCServerChannel) CanDeliverTo(address *hyper.Address) bool
- func (c *GRPCServerChannel) Close() error
- func (c *GRPCServerChannel) DeliverRequest(request *hyper.Request) (*hyper.Response, error)
- func (c *GRPCServerChannel) HandleConnectionRequest(address *hyper.Address, request *hyper.Request) (*hyper.Response, error)
- func (c *GRPCServerChannel) HandleRequest(request *hyper.Request, clientInfo *hyper.ClientInfo) (*hyper.Response, error)
- func (c *GRPCServerChannel) Open() error
- func (c *GRPCServerChannel) Type() string
- type GRPCServerConnection
- type GRPCServerEntrySettings
- type JSONRPCClientChannel
- func (c *JSONRPCClientChannel) CanDeliverTo(address *hyper.Address) bool
- func (c *JSONRPCClientChannel) Close() error
- func (c *JSONRPCClientChannel) DeliverRequest(request *hyper.Request) (*hyper.Response, error)
- func (c *JSONRPCClientChannel) Open() error
- func (c *JSONRPCClientChannel) Type() string
- type JSONRPCServerChannel
- func (c *JSONRPCServerChannel) CanDeliverTo(address *hyper.Address) bool
- func (c *JSONRPCServerChannel) Close() error
- func (c *JSONRPCServerChannel) DeliverRequest(request *hyper.Request) (*hyper.Response, error)
- func (c *JSONRPCServerChannel) Open() error
- func (c *JSONRPCServerChannel) Type() string
- type ProxyListener
- type QUICChannel
- type QUICChannelConfig
- type QUICChannelSettings
- type QUICLocalChannel
- type QUICRemoteChannel
- type QUICSettings
- type RequestConnectionResponse
- type StdoutChannel
- type StdoutSettings
Constants ¶
This section is empty.
Variables ¶
View Source
var Channels = hyper.ChannelDefinitions{ "stdout": hyper.ChannelDefinition{ Name: "Stdout Channel", Description: "Prints messages to stdout (just for testing and debugging)", Maker: MakeStdoutChannel, SettingsValidator: StdoutSettingsValidator, }, "jsonrpc_client": hyper.ChannelDefinition{ Name: "JSONRPC Client Channel", Description: "Creates outgoing JSONRPC connections to deliver and receive messages", Maker: MakeJSONRPCClientChannel, SettingsValidator: JSONRPCClientSettingsValidator, }, "grpc_client": hyper.ChannelDefinition{ Name: "gRPC Client Channel", Description: "Creates outgoing gRPC connections to deliver and receive messages", Maker: MakeGRPCClientChannel, SettingsValidator: GRPCClientSettingsValidator, }, "jsonrpc_server": hyper.ChannelDefinition{ Name: "JSONRPC Server Channel", Description: "Accepts incoming JSONRPC connections to deliver and receive messages", Maker: MakeJSONRPCServerChannel, SettingsValidator: JSONRPCServerSettingsValidator, }, "grpc_server": hyper.ChannelDefinition{ Name: "gRPC Server Channel", Description: "Accepts incoming gRPC connections to deliver and receive messages", Maker: MakeGRPCServerChannel, SettingsValidator: GRPCServerSettingsValidator, }, "quic": hyper.ChannelDefinition{ Name: "QUIC Channel", Description: "Uses QUIC to forward traffic between peers", Maker: MakeQUICChannel, SettingsValidator: QUICSettingsValidator, }, }
View Source
var GRPCServerEntrySettingsForm = forms.Form{ Fields: []forms.Field{ { Name: "address", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "internal", Validators: []forms.Validator{ forms.IsOptional{Default: false}, forms.IsBoolean{}, }, }, { Name: "proxy", Validators: []forms.Validator{ forms.IsOptional{Default: ""}, forms.IsString{}, }, }, }, }
View Source
var QUICChannelForm = forms.Form{ Fields: []forms.Field{ { Name: "remote", Validators: []forms.Validator{ forms.IsStringMap{ Form: &QUICRemoteForm, }, }, }, { Name: "local", Validators: []forms.Validator{ forms.IsStringMap{ Form: &QUICLocalForm, }, }, }, }, }
View Source
var QUICChannelSettingsForm = forms.Form{ Fields: []forms.Field{ { Name: "address", Validators: []forms.Validator{ forms.IsString{}, }, }, }, }
View Source
var QUICForm = forms.Form{ Fields: []forms.Field{ { Name: "tls", Validators: []forms.Validator{ forms.IsStringMap{ Form: &tls.TLSSettingsForm, }, }, }, { Name: "bindAddress", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "channels", Validators: []forms.Validator{ forms.IsList{ Validators: []forms.Validator{ forms.IsStringMap{ Form: &QUICChannelForm, }, }, }, }, }, }, }
View Source
var QUICLocalForm = forms.Form{ Fields: []forms.Field{ { Name: "port", Validators: []forms.Validator{ forms.IsInteger{ HasMin: true, Min: 1, HasMax: true, Max: 65535, }, }, }, { Name: "host", Validators: []forms.Validator{ forms.IsOptional{Default: "0.0.0.0"}, forms.IsString{}, }, }, }, }
View Source
var QUICRemoteForm = forms.Form{ Fields: []forms.Field{ { Name: "host", Validators: []forms.Validator{ forms.IsString{}, }, }, { Name: "port", Validators: []forms.Validator{ forms.IsInteger{ HasMin: true, Min: 1, HasMax: true, Max: 65535, }, }, }, }, }
View Source
var RequestConnectionResponseForm = forms.Form{ Fields: []forms.Field{ { Name: "token", Validators: []forms.Validator{ forms.IsBytes{Encoding: "base64"}, }, }, { Name: "endpoint", Validators: []forms.Validator{ forms.IsString{}, }, }, }, }
View Source
var StdoutSettingsForm = forms.Form{ Fields: []forms.Field{}, }
Functions ¶
func MakeGRPCClientChannel ¶
func MakeGRPCServerChannel ¶
func MakeQUICChannel ¶ added in v0.3.1
func MakeStdoutChannel ¶
func QUICSettingsValidator ¶ added in v0.3.1
func StdoutSettingsValidator ¶
Types ¶
type GRPCClientChannel ¶
type GRPCClientChannel struct { hyper.BaseChannel Settings grpc.GRPCClientSettings // contains filtered or unexported fields }
func (*GRPCClientChannel) CanDeliverTo ¶
func (c *GRPCClientChannel) CanDeliverTo(address *hyper.Address) bool
func (*GRPCClientChannel) Close ¶
func (c *GRPCClientChannel) Close() error
func (*GRPCClientChannel) DeliverRequest ¶
func (*GRPCClientChannel) HandleRequest ¶
func (c *GRPCClientChannel) HandleRequest(request *hyper.Request, clientInfo *hyper.ClientInfo) (*hyper.Response, error)
func (*GRPCClientChannel) Open ¶
func (c *GRPCClientChannel) Open() error
func (*GRPCClientChannel) Type ¶
func (c *GRPCClientChannel) Type() string
type GRPCServerChannel ¶
type GRPCServerChannel struct { hyper.BaseChannel Settings grpc.GRPCServerSettings // contains filtered or unexported fields }
func (*GRPCServerChannel) CanDeliverTo ¶
func (c *GRPCServerChannel) CanDeliverTo(address *hyper.Address) bool
func (*GRPCServerChannel) Close ¶
func (c *GRPCServerChannel) Close() error
func (*GRPCServerChannel) DeliverRequest ¶
func (*GRPCServerChannel) HandleConnectionRequest ¶
func (*GRPCServerChannel) HandleRequest ¶
func (c *GRPCServerChannel) HandleRequest(request *hyper.Request, clientInfo *hyper.ClientInfo) (*hyper.Response, error)
func (*GRPCServerChannel) Open ¶
func (c *GRPCServerChannel) Open() error
func (*GRPCServerChannel) Type ¶
func (c *GRPCServerChannel) Type() string
type GRPCServerConnection ¶
type GRPCServerConnection struct { Name string Address string Stale bool // contains filtered or unexported fields }
func (*GRPCServerConnection) Close ¶
func (c *GRPCServerConnection) Close() error
func (*GRPCServerConnection) Open ¶
func (c *GRPCServerConnection) Open() error
type GRPCServerEntrySettings ¶
type JSONRPCClientChannel ¶
type JSONRPCClientChannel struct { hyper.BaseChannel Settings *jsonrpc.JSONRPCClientSettings }
func (*JSONRPCClientChannel) CanDeliverTo ¶
func (c *JSONRPCClientChannel) CanDeliverTo(address *hyper.Address) bool
func (*JSONRPCClientChannel) Close ¶
func (c *JSONRPCClientChannel) Close() error
func (*JSONRPCClientChannel) DeliverRequest ¶
func (*JSONRPCClientChannel) Open ¶
func (c *JSONRPCClientChannel) Open() error
func (*JSONRPCClientChannel) Type ¶
func (c *JSONRPCClientChannel) Type() string
type JSONRPCServerChannel ¶
type JSONRPCServerChannel struct { hyper.BaseChannel Settings *jsonrpc.JSONRPCServerSettings Server *jsonrpc.JSONRPCServer }
func (*JSONRPCServerChannel) CanDeliverTo ¶
func (c *JSONRPCServerChannel) CanDeliverTo(address *hyper.Address) bool
func (*JSONRPCServerChannel) Close ¶
func (c *JSONRPCServerChannel) Close() error
func (*JSONRPCServerChannel) DeliverRequest ¶
func (*JSONRPCServerChannel) Open ¶
func (c *JSONRPCServerChannel) Open() error
func (*JSONRPCServerChannel) Type ¶
func (c *JSONRPCServerChannel) Type() string
type ProxyListener ¶
func MakeProxyListener ¶
func MakeProxyListener(listener net.Listener) *ProxyListener
func (*ProxyListener) Accept ¶
func (l *ProxyListener) Accept() (net.Conn, error)
Accept a connection, ensuring that rate limits are enforced
func (*ProxyListener) Inject ¶
func (l *ProxyListener) Inject(value interface{}) error
func (*ProxyListener) Start ¶
func (l *ProxyListener) Start()
type QUICChannel ¶ added in v0.3.1
type QUICChannel struct { hyper.BaseChannel Settings *QUICSettings }
func (*QUICChannel) CanDeliverTo ¶ added in v0.3.1
func (q *QUICChannel) CanDeliverTo(*hyper.Address) bool
func (*QUICChannel) Close ¶ added in v0.3.1
func (q *QUICChannel) Close() error
func (*QUICChannel) DeliverRequest ¶ added in v0.3.1
func (*QUICChannel) Open ¶ added in v0.3.1
func (q *QUICChannel) Open() error
func (*QUICChannel) Type ¶ added in v0.3.1
func (q *QUICChannel) Type() string
type QUICChannelConfig ¶ added in v0.3.1
type QUICChannelConfig struct { Remote *QUICRemoteChannel `json:"remote"` Local *QUICLocalChannel `json:"local"` }
type QUICChannelSettings ¶ added in v0.3.1
type QUICChannelSettings struct {
Address string `json:"address"`
}
type QUICLocalChannel ¶ added in v0.3.1
type QUICRemoteChannel ¶ added in v0.3.1
type QUICSettings ¶ added in v0.3.1
type QUICSettings struct { TLS *tls.TLSSettings `json:"tls"` BindAddress string `json:"bindAddress"` Channels []*QUICChannelConfig `json:"channels"` }
type StdoutChannel ¶
type StdoutChannel struct { hyper.BaseChannel Settings StdoutSettings }
func (*StdoutChannel) CanDeliverTo ¶
func (c *StdoutChannel) CanDeliverTo(address *hyper.Address) bool
func (*StdoutChannel) Close ¶
func (c *StdoutChannel) Close() error
func (*StdoutChannel) DeliverRequest ¶
func (*StdoutChannel) Open ¶
func (c *StdoutChannel) Open() error
func (*StdoutChannel) Type ¶
func (c *StdoutChannel) Type() string
type StdoutSettings ¶
type StdoutSettings struct { }
Click to show internal directories.
Click to hide internal directories.