monitor

package
v2.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package monitor is a generated protocol buffer package.

It is generated from these files:

github.com/TheThingsNetwork/ttn/api/monitor/monitor.proto

It has these top-level messages:

Index

Constants

This section is empty.

Variables

View Source
var DefaultClientConfig = ClientConfig{
	BackgroundContext: context.Background(),
	BufferSize:        10,
}

DefaultClientConfig for monitor Client

View Source
var TLSConfig *tls.Config

TLSConfig to use

Functions

func RegisterMonitorServer

func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)

Types

type Client

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

Client for monitor

func NewClient

func NewClient(config ClientConfig) *Client

NewClient creates a new Client with the given configuration

func (*Client) AddConn

func (c *Client) AddConn(name string, conn *grpc.ClientConn)

AddConn adds a new monitor server on an existing connection This function should not be called after streams have been started

func (*Client) AddServer

func (c *Client) AddServer(name, address string)

AddServer adds a new monitor server. Supplying DialOptions overrides the default dial options. If the default DialOptions are used, TLS will be used to connect to monitors with a "-tls" suffix in their name. This function should not be called after streams have been started

func (*Client) Close

func (c *Client) Close()

Close the client and all its connections

func (*Client) NewBrokerStreams

func (c *Client) NewBrokerStreams(id string, token string) GenericStream

NewBrokerStreams returns new streams using the given broker ID and token

func (*Client) NewGatewayStreams

func (c *Client) NewGatewayStreams(id string, token string) GenericStream

NewGatewayStreams returns new streams using the given gateway ID and token

func (*Client) NewHandlerStreams

func (c *Client) NewHandlerStreams(id string, token string) GenericStream

NewHandlerStreams returns new streams using the given handler ID and token

type ClientConfig

type ClientConfig struct {
	BackgroundContext context.Context
	BufferSize        int
}

ClientConfig for monitor Client

type GenericStream

type GenericStream interface {
	Send(interface{})
	Close()
}

GenericStream is used for sending anything to the monitor. Depending on the context, this can be - *router.UplinkMessage - *router.DownlinkMessage - *gateway.Status - *broker.DeduplicatedUplinkMessage - *broker.DownlinkMessage

type MonitorClient

type MonitorClient interface {
	GatewayStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_GatewayStatusClient, error)
	GatewayUplink(ctx context.Context, opts ...grpc.CallOption) (Monitor_GatewayUplinkClient, error)
	GatewayDownlink(ctx context.Context, opts ...grpc.CallOption) (Monitor_GatewayDownlinkClient, error)
	BrokerUplink(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerUplinkClient, error)
	BrokerDownlink(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerDownlinkClient, error)
	HandlerUplink(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerUplinkClient, error)
	HandlerDownlink(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerDownlinkClient, error)
}

func NewMonitorClient

func NewMonitorClient(cc *grpc.ClientConn) MonitorClient

type MonitorServer

type MonitorServer interface {
	GatewayStatus(Monitor_GatewayStatusServer) error
	GatewayUplink(Monitor_GatewayUplinkServer) error
	GatewayDownlink(Monitor_GatewayDownlinkServer) error
	BrokerUplink(Monitor_BrokerUplinkServer) error
	BrokerDownlink(Monitor_BrokerDownlinkServer) error
	HandlerUplink(Monitor_HandlerUplinkServer) error
	HandlerDownlink(Monitor_HandlerDownlinkServer) error
}

type Monitor_BrokerDownlinkClient

type Monitor_BrokerDownlinkClient interface {
	Send(*broker.DownlinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_BrokerDownlinkServer

type Monitor_BrokerDownlinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*broker.DownlinkMessage, error)
	grpc.ServerStream
}

type Monitor_BrokerUplinkClient

type Monitor_BrokerUplinkClient interface {
	Send(*broker.DeduplicatedUplinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_BrokerUplinkServer

type Monitor_BrokerUplinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*broker.DeduplicatedUplinkMessage, error)
	grpc.ServerStream
}

type Monitor_GatewayDownlinkClient

type Monitor_GatewayDownlinkClient interface {
	Send(*router.DownlinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_GatewayDownlinkServer

type Monitor_GatewayDownlinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*router.DownlinkMessage, error)
	grpc.ServerStream
}

type Monitor_GatewayStatusClient

type Monitor_GatewayStatusClient interface {
	Send(*gateway.Status) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_GatewayStatusServer

type Monitor_GatewayStatusServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*gateway.Status, error)
	grpc.ServerStream
}

type Monitor_GatewayUplinkClient

type Monitor_GatewayUplinkClient interface {
	Send(*router.UplinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_GatewayUplinkServer

type Monitor_GatewayUplinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*router.UplinkMessage, error)
	grpc.ServerStream
}

type Monitor_HandlerDownlinkClient

type Monitor_HandlerDownlinkClient interface {
	Send(*broker.DownlinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_HandlerDownlinkServer

type Monitor_HandlerDownlinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*broker.DownlinkMessage, error)
	grpc.ServerStream
}

type Monitor_HandlerUplinkClient

type Monitor_HandlerUplinkClient interface {
	Send(*broker.DeduplicatedUplinkMessage) error
	CloseAndRecv() (*google_protobuf1.Empty, error)
	grpc.ClientStream
}

type Monitor_HandlerUplinkServer

type Monitor_HandlerUplinkServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*broker.DeduplicatedUplinkMessage, error)
	grpc.ServerStream
}

type ReferenceMonitorServer

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

ReferenceMonitorServer is a new reference monitor server

func NewReferenceMonitorServer

func NewReferenceMonitorServer(bufferSize int) *ReferenceMonitorServer

NewReferenceMonitorServer creates a new reference monitor server

func (s *ReferenceMonitorServer) BrokerDownlink(stream Monitor_BrokerDownlinkServer) error

BrokerDownlink RPC

BrokerUplink RPC

func (s *ReferenceMonitorServer) GatewayDownlink(stream Monitor_GatewayDownlinkServer) error

GatewayDownlink RPC

func (*ReferenceMonitorServer) GatewayStatus

func (s *ReferenceMonitorServer) GatewayStatus(stream Monitor_GatewayStatusServer) (err error)

GatewayStatus RPC

func (s *ReferenceMonitorServer) GatewayUplink(stream Monitor_GatewayUplinkServer) error

GatewayUplink RPC

func (s *ReferenceMonitorServer) HandlerDownlink(stream Monitor_HandlerDownlinkServer) error

HandlerDownlink RPC

func (s *ReferenceMonitorServer) HandlerUplink(stream Monitor_HandlerUplinkServer) error

HandlerUplink RPC

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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