endpoint

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	OptionListenHost      = "listenHost"
	OptionListenPort      = "listenPort"
	OptionTLSdomain       = "tlsDomain"
	OptionTLSdirCert      = "tlsDirCert"
	OptionTLSconfig       = "tlsConfig"
	OptionMetricsInterval = "metricsInterval"
	OptionSetMode         = "setMode"

	ModeHTTPWS   = 0
	ModeHTTPonly = 1
	ModeWSonly   = 2
)
View Source
const (
	OptionPrivKey      = "setPrivKey"
	OptionTopic        = "setTopic"
	OptionID           = "setID"
	OptionBootnodes    = "setBootnodes"
	OptionTransportKey = "setTransportKey"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	Init(listener chan transports.Message) error
	SetOption(name string, value interface{}) error
	Transport() transports.Transport
	ID() string
}

Endpoint represents a valid Endpoint for the multirpc stack

type HTTPWSconfig added in v0.1.7

type HTTPWSconfig struct {
	ListenHost string
	ListenPort int32
	TLSdomain  string
	TLSdirCert string
	Mode       int8 // Modes available: 0:HTTP+WS, 1:HTTP, 2:WS
	TLSconfig  *tls.Config
	Metrics    *metrics.Metrics
}

type HTTPWSendPoint added in v0.1.7

type HTTPWSendPoint struct {
	Proxy        *mhttp.Proxy
	MetricsAgent *metrics.Agent
	// contains filtered or unexported fields
}

HTTPWSendPoint handles an HTTP + Websocket connection (client chooses).

func (*HTTPWSendPoint) ID added in v0.1.7

func (e *HTTPWSendPoint) ID() string

ID returns the name of the transport implemented on the endpoint

func (*HTTPWSendPoint) Init added in v0.1.7

func (e *HTTPWSendPoint) Init(listener chan transports.Message) error

Init creates a new websockets/http mixed endpoint

func (*HTTPWSendPoint) SetOption added in v0.1.7

func (e *HTTPWSendPoint) SetOption(name string, value interface{}) error

SetOption configures a endpoint option, valid options are: listenHost:string, listenPort:int32, tlsDomain:string, tlsDirCert:string, metricsInterval:int

func (*HTTPWSendPoint) Transport added in v0.1.7

func (e *HTTPWSendPoint) Transport() transports.Transport

Transport returns the transport used for this endpoint

type SubPubEndpoint added in v0.1.8

type SubPubEndpoint struct {
	// contains filtered or unexported fields
}

func (*SubPubEndpoint) ID added in v0.1.8

func (sp *SubPubEndpoint) ID() string

func (*SubPubEndpoint) Init added in v0.1.8

func (sp *SubPubEndpoint) Init(listener chan transports.Message) error

func (*SubPubEndpoint) SetOption added in v0.1.8

func (sp *SubPubEndpoint) SetOption(name string, value interface{}) error

func (*SubPubEndpoint) Transport added in v0.1.8

func (sp *SubPubEndpoint) Transport() transports.Transport

Jump to

Keyboard shortcuts

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