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)
- func (c *Client) Close()
- func (c *Client) NewBrokerStreams(id string, token string) GenericStream
- func (c *Client) NewGatewayStreams(id string, token string) GenericStream
- func (c *Client) NewHandlerStreams(id string, token string) GenericStream
- func (c *Client) NewNetworkServerStreams(id string, token string) GenericStream
- func (c *Client) NewRouterStreams(id string, token string) GenericStream
- func (c *Client) SetStatusInterval(interval time.Duration)
- func (c *Client) TickStatus(f func())
- type ClientConfig
- type GenericStream
- type MonitorClient
- type MonitorServer
- type Monitor_BrokerDownlinkClient
- type Monitor_BrokerDownlinkServer
- type Monitor_BrokerStatusClient
- type Monitor_BrokerStatusServer
- 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 Monitor_HandlerDownlinkClient
- type Monitor_HandlerDownlinkServer
- type Monitor_HandlerStatusClient
- type Monitor_HandlerStatusServer
- type Monitor_HandlerUplinkClient
- type Monitor_HandlerUplinkServer
- type Monitor_NetworkServerStatusClient
- type Monitor_NetworkServerStatusServer
- type Monitor_RouterStatusClient
- type Monitor_RouterStatusServer
- type ReferenceMonitorServer
- func (s *ReferenceMonitorServer) BrokerDownlink(stream Monitor_BrokerDownlinkServer) error
- func (s *ReferenceMonitorServer) BrokerStatus(stream Monitor_BrokerStatusServer) (err 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
- func (s *ReferenceMonitorServer) HandlerDownlink(stream Monitor_HandlerDownlinkServer) error
- func (s *ReferenceMonitorServer) HandlerStatus(stream Monitor_HandlerStatusServer) (err error)
- func (s *ReferenceMonitorServer) HandlerUplink(stream Monitor_HandlerUplinkServer) error
- func (s *ReferenceMonitorServer) NetworkServerStatus(stream Monitor_NetworkServerStatusServer) (err error)
- func (s *ReferenceMonitorServer) RouterStatus(stream Monitor_RouterStatusServer) (err error)
Constants ¶
This section is empty.
Variables ¶
var DefaultClientConfig = ClientConfig{ BackgroundContext: context.Background(), BufferSize: 10, }
DefaultClientConfig for monitor Client
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 ¶
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
func (*Client) NewHandlerStreams ¶
func (c *Client) NewHandlerStreams(id string, token string) GenericStream
NewHandlerStreams returns new streams using the given handler ID and token
func (*Client) NewNetworkServerStreams ¶
func (c *Client) NewNetworkServerStreams(id string, token string) GenericStream
NewNetworkServerStreams returns new streams using the given networkServer ID and token
func (*Client) NewRouterStreams ¶
func (c *Client) NewRouterStreams(id string, token string) GenericStream
NewRouterStreams returns new streams using the given router ID and token
func (*Client) SetStatusInterval ¶
SetStatusInterval creates a status ticker
func (*Client) TickStatus ¶
func (c *Client) TickStatus(f func())
TickStatus calls f when a status needs to be sent
type ClientConfig ¶
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 { RouterStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_RouterStatusClient, error) 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) BrokerStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerStatusClient, error) BrokerUplink(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerUplinkClient, error) BrokerDownlink(ctx context.Context, opts ...grpc.CallOption) (Monitor_BrokerDownlinkClient, error) HandlerStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerStatusClient, error) HandlerUplink(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerUplinkClient, error) HandlerDownlink(ctx context.Context, opts ...grpc.CallOption) (Monitor_HandlerDownlinkClient, error) NetworkServerStatus(ctx context.Context, opts ...grpc.CallOption) (Monitor_NetworkServerStatusClient, error) }
func NewMonitorClient ¶
func NewMonitorClient(cc *grpc.ClientConn) MonitorClient
type MonitorServer ¶
type MonitorServer interface { RouterStatus(Monitor_RouterStatusServer) error GatewayStatus(Monitor_GatewayStatusServer) error GatewayUplink(Monitor_GatewayUplinkServer) error GatewayDownlink(Monitor_GatewayDownlinkServer) error BrokerStatus(Monitor_BrokerStatusServer) error BrokerUplink(Monitor_BrokerUplinkServer) error BrokerDownlink(Monitor_BrokerDownlinkServer) error HandlerStatus(Monitor_HandlerStatusServer) error HandlerUplink(Monitor_HandlerUplinkServer) error HandlerDownlink(Monitor_HandlerDownlinkServer) error NetworkServerStatus(Monitor_NetworkServerStatusServer) 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_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_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_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_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 Monitor_NetworkServerStatusClient ¶
type Monitor_NetworkServerStatusClient interface { Send(*networkserver.Status) error CloseAndRecv() (*google_protobuf1.Empty, error) grpc.ClientStream }
type Monitor_NetworkServerStatusServer ¶
type Monitor_NetworkServerStatusServer interface { SendAndClose(*google_protobuf1.Empty) error Recv() (*networkserver.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 }
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) BrokerStatus ¶
func (s *ReferenceMonitorServer) BrokerStatus(stream Monitor_BrokerStatusServer) (err error)
BrokerStatus 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
func (*ReferenceMonitorServer) HandlerDownlink ¶
func (s *ReferenceMonitorServer) HandlerDownlink(stream Monitor_HandlerDownlinkServer) error
HandlerDownlink RPC
func (*ReferenceMonitorServer) HandlerStatus ¶
func (s *ReferenceMonitorServer) HandlerStatus(stream Monitor_HandlerStatusServer) (err error)
HandlerStatus RPC
func (*ReferenceMonitorServer) HandlerUplink ¶
func (s *ReferenceMonitorServer) HandlerUplink(stream Monitor_HandlerUplinkServer) error
HandlerUplink RPC
func (*ReferenceMonitorServer) NetworkServerStatus ¶
func (s *ReferenceMonitorServer) NetworkServerStatus(stream Monitor_NetworkServerStatusServer) (err error)
NetworkServerStatus RPC
func (*ReferenceMonitorServer) RouterStatus ¶
func (s *ReferenceMonitorServer) RouterStatus(stream Monitor_RouterStatusServer) (err error)
RouterStatus RPC