node

package
v0.0.0-...-496ee5d Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const RetryConnection = 5

Variables

View Source
var (
	ErrPermDenied = errors.New("access denied")
)

Functions

This section is empty.

Types

type GWOptions

type GWOptions struct {
	Registry        *directory.Registry
	SRpcOpts        []server.Option
	AnnounceService bool
	Options
}

type Gateway

type Gateway struct {
	// sRPC mandatory base layer
	server.Server
	// contains filtered or unexported fields
}

func NewGateway

func NewGateway(opts GWOptions) *Gateway

func (*Gateway) AwaitSMCRound

func (n *Gateway) AwaitSMCRound(stream proto.Gateway_AwaitSMCRoundServer) error

func (*Gateway) Ping

func (n *Gateway) Ping(ctx context.Context, in *proto.SMCInfo) (*pbJob.CmdResult, error)

func (*Gateway) Run

func (g *Gateway) Run()

type Options

type Options struct {
	// Certificate for TLS Client Auth and Identification.
	CertFile string
	KeyFile  string
	// Interface specifies the interface to pin for discovery.
	Inteface string
	// Pairing and registration.
	NodeInfo   string
	UsePairing bool
}

type Peer

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

func NewPeer

func NewPeer(opts PeerOptions) *Peer

func (*Peer) Init

func (p *Peer) Init()

func (*Peer) Operate

func (p *Peer) Operate()

func (*Peer) Run

func (p *Peer) Run()

type PeerOptions

type PeerOptions struct {
	GatewayID  string
	SmcBackend smc.Connector
	SRpcOpts   []client.Option
	Options
}

type RunState

type RunState uint8
const (
	Discovery RunState = iota
	Pairing
	Resolving
	Connecting
	Operating
	Restart
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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