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 ¶
- Variables
- func RegisterMonitorServer(s *grpc.Server, srv MonitorServer)
- type Client
- func (c *Client) AddConn(name string, conn *grpc.ClientConn)
- func (c *Client) AddServer(name, address string, opts ...grpc.DialOption)
- func (c *Client) Close()
- func (c *Client) NewBrokerStreams(id string, token string) GenericStream
- func (c *Client) NewGatewayStreams(id string, token string) GenericStream
- type ClientConfig
- type GenericStream
- type MonitorClient
- type MonitorServer
- type Monitor_BrokerDownlinkClient
- type Monitor_BrokerDownlinkServer
- type Monitor_BrokerUplinkClient
- type Monitor_BrokerUplinkServer
- type Monitor_GatewayDownlinkClient
- type Monitor_GatewayDownlinkServer
- type Monitor_GatewayStatusClient
- type Monitor_GatewayStatusServer
- type Monitor_GatewayUplinkClient
- type Monitor_GatewayUplinkServer
- type ReferenceMonitorServer
- func (s *ReferenceMonitorServer) BrokerDownlink(stream Monitor_BrokerDownlinkServer) error
- func (s *ReferenceMonitorServer) BrokerUplink(stream Monitor_BrokerUplinkServer) error
- func (s *ReferenceMonitorServer) GatewayDownlink(stream Monitor_GatewayDownlinkServer) error
- func (s *ReferenceMonitorServer) GatewayStatus(stream Monitor_GatewayStatusServer) (err error)
- func (s *ReferenceMonitorServer) GatewayUplink(stream Monitor_GatewayUplinkServer) error
Constants ¶
This section is empty.
Variables ¶
var DefaultClientConfig = ClientConfig{
BufferSize: 10,
}
DefaultClientConfig for monitor Client
var DefaultDialOptions = []grpc.DialOption{ grpc.WithBlock(), grpc.FailOnNonTempDialError(false), grpc.WithStreamInterceptor(restartstream.Interceptor(restartstream.DefaultSettings)), }
DefaultDialOptions for connecting with a monitor server
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, opts ...grpc.DialOption)
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) 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
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) }
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 }
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 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 (*ReferenceMonitorServer) BrokerDownlink ¶
func (s *ReferenceMonitorServer) BrokerDownlink(stream Monitor_BrokerDownlinkServer) error
BrokerDownlink RPC
func (*ReferenceMonitorServer) BrokerUplink ¶
func (s *ReferenceMonitorServer) BrokerUplink(stream Monitor_BrokerUplinkServer) error
BrokerUplink RPC
func (*ReferenceMonitorServer) GatewayDownlink ¶
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 (*ReferenceMonitorServer) GatewayUplink ¶
func (s *ReferenceMonitorServer) GatewayUplink(stream Monitor_GatewayUplinkServer) error
GatewayUplink RPC