Documentation
¶
Index ¶
Constants ¶
View Source
const ( PrecedenceDefault Precedence = 0 PrecedenceRequired = 1 PrecedenceFailed = 2 )
View Source
const (
LatencyCheckInterval = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
Authenticate() error
Dial(serviceName string) (edge.ServiceConn, error)
DialWithOptions(serviceName string, options *DialOptions) (edge.ServiceConn, error)
Listen(serviceName string) (edge.Listener, error)
ListenWithOptions(serviceName string, options *ListenOptions) (edge.Listener, error)
GetServiceId(serviceName string) (string, bool, error)
GetServices() ([]edge.Service, error)
GetService(serviceName string) (*edge.Service, bool)
GetSession(id string) (*edge.Session, error)
GetBindSession(id string) (*edge.Session, error)
Metrics() metrics.Registry
// Close closes any connections open to edge routers
Close()
}
func NewContext ¶
func NewContext() Context
func NewContextWithConfig ¶
type DialOptions ¶ added in v0.13.47
func (DialOptions) GetConnectTimeout ¶ added in v0.13.47
func (d DialOptions) GetConnectTimeout() time.Duration
type ListenOptions ¶ added in v0.13.47
type ListenOptions struct {
Cost uint16
Precedence Precedence
ConnectTimeout time.Duration
MaxConnections int
Identity string
BindUsingEdgeIdentity bool
}
func DefaultListenOptions ¶ added in v0.13.47
func DefaultListenOptions() *ListenOptions
type Precedence ¶ added in v0.13.47
type Precedence byte
Click to show internal directories.
Click to hide internal directories.