rpc

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

Controller implements node.Controller interface for gRPC

func NewController

func NewController(config *config.Config, metrics *metrics.Metrics) *Controller

NewController builds new Controller from config

func (*Controller) Authenticate

func (c *Controller) Authenticate(sid string, path string, headers *map[string]string) (string, []string, error)

Authenticate performs Connect RPC call

func (*Controller) Disconnect

func (c *Controller) Disconnect(sid string, id string, subscriptions []string, path string, headers *map[string]string) error

Disconnect performs disconnect RPC call

func (*Controller) Perform

func (c *Controller) Perform(sid string, id string, channel string, data string) (*node.CommandResult, error)

Perform performs Command RPC call with "perform" command

func (*Controller) Shutdown

func (c *Controller) Shutdown() error

Shutdown closes connections

func (*Controller) Start

func (c *Controller) Start() error

Start initializes RPC connection pool

func (*Controller) Subscribe

func (c *Controller) Subscribe(sid string, id string, channel string) (*node.CommandResult, error)

Subscribe performs Command RPC call with "subscribe" command

func (*Controller) Unsubscribe

func (c *Controller) Unsubscribe(sid string, id string, channel string) (*node.CommandResult, error)

Unsubscribe performs Command RPC call with "unsubscribe" command

Jump to

Keyboard shortcuts

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