relay

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultNumWorkers = 10
)

Variables

This section is empty.

Functions

func NewConnection

func NewConnection(address, token string, timeout time.Duration, disableTLS, noCtx bool) (*grpc.ClientConn, context.Context, error)

func TestConnection

func TestConnection(cfg *Config) error

Types

type Config

type Config struct {
	Token       string
	GRPCAddress string
	NumWorkers  int
	RelayCh     chan interface{}
	DisableTLS  bool
	Timeout     time.Duration // general grpc timeout (used for all grpc calls)
}

type Relay

type Relay struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(relayCfg *Config) (*Relay, error)

func (*Relay) Run

func (r *Relay) Run(id int, conn *grpc.ClientConn, ctx context.Context)

func (*Relay) StartWorkers

func (r *Relay) StartWorkers() error

Jump to

Keyboard shortcuts

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