monitor

package
v0.0.0-...-2f095fc Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2016 License: MIT Imports: 20 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

View Source
const BufferSize = 10

BufferSize gives the size for the monitor buffers

Variables

This section is empty.

Functions

func RegisterMonitorServer

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

Types

type Client

type Client struct {
	Ctx log.Interface
	// contains filtered or unexported fields
}

Client is a wrapper around MonitorClient

func NewClient

func NewClient(ctx log.Interface, monitorAddr string) (cl *Client, err error)

NewClient is a wrapper for NewMonitorClient, initializes connection to MonitorServer on monitorAddr with default gRPC options

func (*Client) Close

func (cl *Client) Close() (err error)

Close closes connection to the monitor

func (*Client) GatewayClient

func (cl *Client) GatewayClient(id string) (gtwCl GatewayClient)

GatewayClient returns monitor GatewayClient for id and token specified

func (*Client) IsConnected

func (cl *Client) IsConnected() bool

IsConnected returns whether connection to the monitor had been established or not

func (*Client) Open

func (cl *Client) Open() (err error)

Open opens connection to the monitor

func (*Client) Reopen

func (cl *Client) Reopen() (err error)

Reopen reopens connection to the monitor. It first attempts to close already opened connection and then opens a new one. If closing already opened connection fails, Reopen fails too.

type GatewayClient

type GatewayClient interface {
	SetToken(token string)
	IsConfigured() bool
	SendStatus(status *gateway.Status) (err error)
	SendUplink(msg *router.UplinkMessage) (err error)
	SendDownlink(msg *router.DownlinkMessage) (err error)
	Close() (err error)
}

GatewayClient is used as the main client for Gateways to communicate with the monitor

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)
	RouterStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_RouterStatusClient, error)
	BrokerStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerStatusClient, error)
	HandlerStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerStatusClient, 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
	RouterStatus(Monitor_RouterStatusServer) error
	BrokerStatus(Monitor_BrokerStatusServer) error
	HandlerStatus(Monitor_HandlerStatusServer) error
}

type Monitor_BrokerStatusClient

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

type Monitor_BrokerStatusServer

type Monitor_BrokerStatusServer interface {
	SendAndClose(*google_protobuf1.Empty) error
	Recv() (*broker.Status, 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_HandlerStatusClient

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

type Monitor_HandlerStatusServer

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

type Monitor_RouterStatusClient

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

type Monitor_RouterStatusServer

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

Jump to

Keyboard shortcuts

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