broker

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2016 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package broker is a generated protocol buffer package.

It is generated from these files:

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

It has these top-level messages:

DownlinkOption
UplinkMessage
DownlinkMessage
DeviceActivationResponse
DeduplicatedUplinkMessage
DeviceActivationRequest
DeduplicatedDeviceActivationRequest
ActivationChallengeRequest
ActivationChallengeResponse
SubscribeRequest
StatusRequest
Status
ApplicationHandlerRegistration

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthBroker = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBroker   = fmt.Errorf("proto: integer overflow")
)
View Source
var DefaultBufferSize = 10

DefaultBufferSize indicates the default send and receive buffer sizes

Functions

func RegisterBrokerManagerServer

func RegisterBrokerManagerServer(s *grpc.Server, srv BrokerManagerServer)

func RegisterBrokerServer

func RegisterBrokerServer(s *grpc.Server, srv BrokerServer)

Types

type ActivationChallengeRequest

type ActivationChallengeRequest struct {
	Payload []byte                                             `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message *protocol.Message                                  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DevEui  *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui  *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	AppId   string                                             `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	DevId   string                                             `protobuf:"bytes,14,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"`
}

func (*ActivationChallengeRequest) Descriptor

func (*ActivationChallengeRequest) Descriptor() ([]byte, []int)

func (*ActivationChallengeRequest) GetMessage

func (m *ActivationChallengeRequest) GetMessage() *protocol.Message

func (*ActivationChallengeRequest) Marshal

func (m *ActivationChallengeRequest) Marshal() (dAtA []byte, err error)

func (*ActivationChallengeRequest) MarshalPayload

func (m *ActivationChallengeRequest) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*ActivationChallengeRequest) MarshalTo

func (m *ActivationChallengeRequest) MarshalTo(dAtA []byte) (int, error)

func (*ActivationChallengeRequest) ProtoMessage

func (*ActivationChallengeRequest) ProtoMessage()

func (*ActivationChallengeRequest) Reset

func (m *ActivationChallengeRequest) Reset()

func (*ActivationChallengeRequest) Size

func (m *ActivationChallengeRequest) Size() (n int)

func (*ActivationChallengeRequest) String

func (m *ActivationChallengeRequest) String() string

func (*ActivationChallengeRequest) Unmarshal

func (m *ActivationChallengeRequest) Unmarshal(dAtA []byte) error

func (*ActivationChallengeRequest) UnmarshalPayload

func (m *ActivationChallengeRequest) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*ActivationChallengeRequest) Validate

func (m *ActivationChallengeRequest) Validate() error

Validate implements the api.Validator interface

type ActivationChallengeResponse

type ActivationChallengeResponse struct {
	Payload []byte            `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message *protocol.Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}

func (*ActivationChallengeResponse) Descriptor

func (*ActivationChallengeResponse) Descriptor() ([]byte, []int)

func (*ActivationChallengeResponse) GetMessage

func (m *ActivationChallengeResponse) GetMessage() *protocol.Message

func (*ActivationChallengeResponse) Marshal

func (m *ActivationChallengeResponse) Marshal() (dAtA []byte, err error)

func (*ActivationChallengeResponse) MarshalPayload

func (m *ActivationChallengeResponse) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*ActivationChallengeResponse) MarshalTo

func (m *ActivationChallengeResponse) MarshalTo(dAtA []byte) (int, error)

func (*ActivationChallengeResponse) ProtoMessage

func (*ActivationChallengeResponse) ProtoMessage()

func (*ActivationChallengeResponse) Reset

func (m *ActivationChallengeResponse) Reset()

func (*ActivationChallengeResponse) Size

func (m *ActivationChallengeResponse) Size() (n int)

func (*ActivationChallengeResponse) String

func (m *ActivationChallengeResponse) String() string

func (*ActivationChallengeResponse) Unmarshal

func (m *ActivationChallengeResponse) Unmarshal(dAtA []byte) error

func (*ActivationChallengeResponse) UnmarshalPayload

func (m *ActivationChallengeResponse) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

type ApplicationHandlerRegistration

type ApplicationHandlerRegistration struct {
	AppId     string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	HandlerId string `protobuf:"bytes,2,opt,name=handler_id,json=handlerId,proto3" json:"handler_id,omitempty"`
}

func (*ApplicationHandlerRegistration) Descriptor

func (*ApplicationHandlerRegistration) Descriptor() ([]byte, []int)

func (*ApplicationHandlerRegistration) Marshal

func (m *ApplicationHandlerRegistration) Marshal() (dAtA []byte, err error)

func (*ApplicationHandlerRegistration) MarshalTo

func (m *ApplicationHandlerRegistration) MarshalTo(dAtA []byte) (int, error)

func (*ApplicationHandlerRegistration) ProtoMessage

func (*ApplicationHandlerRegistration) ProtoMessage()

func (*ApplicationHandlerRegistration) Reset

func (m *ApplicationHandlerRegistration) Reset()

func (*ApplicationHandlerRegistration) Size

func (m *ApplicationHandlerRegistration) Size() (n int)

func (*ApplicationHandlerRegistration) String

func (*ApplicationHandlerRegistration) Unmarshal

func (m *ApplicationHandlerRegistration) Unmarshal(dAtA []byte) error

func (*ApplicationHandlerRegistration) Validate

func (m *ApplicationHandlerRegistration) Validate() error

Validate implements the api.Validator interface

type BrokerClient

type BrokerClient interface {
	// Router initiates an Association with the Broker.
	Associate(ctx context.Context, opts ...grpc.CallOption) (Broker_AssociateClient, error)
	// Handler subscribes to uplink stream.
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Broker_SubscribeClient, error)
	// Handler initiates downlink stream.
	Publish(ctx context.Context, opts ...grpc.CallOption) (Broker_PublishClient, error)
	// Router requests device activation
	Activate(ctx context.Context, in *DeviceActivationRequest, opts ...grpc.CallOption) (*DeviceActivationResponse, error)
}

func NewBrokerClient

func NewBrokerClient(cc *grpc.ClientConn) BrokerClient

type BrokerManagerClient

type BrokerManagerClient interface {
	// Handler announces a new application to Broker. This is a temporary method that will be removed
	// when we can push updates from the Discovery service to the routing services.
	RegisterApplicationHandler(ctx context.Context, in *ApplicationHandlerRegistration, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
	// Network operator requests Broker status
	GetStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Status, error)
}

func NewBrokerManagerClient

func NewBrokerManagerClient(cc *grpc.ClientConn) BrokerManagerClient

type BrokerManagerServer

type BrokerManagerServer interface {
	// Handler announces a new application to Broker. This is a temporary method that will be removed
	// when we can push updates from the Discovery service to the routing services.
	RegisterApplicationHandler(context.Context, *ApplicationHandlerRegistration) (*google_protobuf.Empty, error)
	// Network operator requests Broker status
	GetStatus(context.Context, *StatusRequest) (*Status, error)
}

type BrokerServer

type BrokerServer interface {
	// Router initiates an Association with the Broker.
	Associate(Broker_AssociateServer) error
	// Handler subscribes to uplink stream.
	Subscribe(*SubscribeRequest, Broker_SubscribeServer) error
	// Handler initiates downlink stream.
	Publish(Broker_PublishServer) error
	// Router requests device activation
	Activate(context.Context, *DeviceActivationRequest) (*DeviceActivationResponse, error)
}

type BrokerStreamServer

type BrokerStreamServer struct {
	RouterAssociateChanFunc  func(md metadata.MD) (up chan *UplinkMessage, down <-chan *DownlinkMessage, cancel func(), err error)
	HandlerSubscribeChanFunc func(md metadata.MD) (ch <-chan *DeduplicatedUplinkMessage, cancel func(), err error)
	HandlerPublishChanFunc   func(md metadata.MD) (ch chan *DownlinkMessage, err error)
	// contains filtered or unexported fields
}

BrokerStreamServer handles gRPC streams as channels

func NewBrokerStreamServer

func NewBrokerStreamServer() *BrokerStreamServer

NewBrokerStreamServer returns a new BrokerStreamServer

func (*BrokerStreamServer) Associate

func (s *BrokerStreamServer) Associate(stream Broker_AssociateServer) (err error)

Associate handles uplink streams from and downlink streams to the router

func (*BrokerStreamServer) Publish

func (s *BrokerStreamServer) Publish(stream Broker_PublishServer) error

Publish handles downlink streams from the handler

func (*BrokerStreamServer) SetLogger

func (s *BrokerStreamServer) SetLogger(logger log.Interface)

SetLogger sets the logger

func (*BrokerStreamServer) Subscribe

func (s *BrokerStreamServer) Subscribe(req *SubscribeRequest, stream Broker_SubscribeServer) (err error)

Subscribe handles uplink streams towards the handler

type Broker_AssociateClient

type Broker_AssociateClient interface {
	Send(*UplinkMessage) error
	Recv() (*DownlinkMessage, error)
	grpc.ClientStream
}

type Broker_AssociateServer

type Broker_AssociateServer interface {
	Send(*DownlinkMessage) error
	Recv() (*UplinkMessage, error)
	grpc.ServerStream
}

type Broker_PublishClient

type Broker_PublishClient interface {
	Send(*DownlinkMessage) error
	CloseAndRecv() (*google_protobuf.Empty, error)
	grpc.ClientStream
}

type Broker_PublishServer

type Broker_PublishServer interface {
	SendAndClose(*google_protobuf.Empty) error
	Recv() (*DownlinkMessage, error)
	grpc.ServerStream
}

type Broker_SubscribeClient

type Broker_SubscribeClient interface {
	Recv() (*DeduplicatedUplinkMessage, error)
	grpc.ClientStream
}

type Broker_SubscribeServer

type Broker_SubscribeServer interface {
	Send(*DeduplicatedUplinkMessage) error
	grpc.ServerStream
}

type DeduplicatedDeviceActivationRequest

type DeduplicatedDeviceActivationRequest struct {
	Payload            []byte                                             `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message            *protocol.Message                                  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DevEui             *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui             *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	AppId              string                                             `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	DevId              string                                             `protobuf:"bytes,14,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"`
	ProtocolMetadata   *protocol.RxMetadata                               `protobuf:"bytes,21,opt,name=protocol_metadata,json=protocolMetadata" json:"protocol_metadata,omitempty"`
	GatewayMetadata    []*gateway.RxMetadata                              `protobuf:"bytes,22,rep,name=gateway_metadata,json=gatewayMetadata" json:"gateway_metadata,omitempty"`
	ActivationMetadata *protocol.ActivationMetadata                       `protobuf:"bytes,23,opt,name=activation_metadata,json=activationMetadata" json:"activation_metadata,omitempty"`
	ServerTime         int64                                              `protobuf:"varint,24,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
	ResponseTemplate   *DeviceActivationResponse                          `protobuf:"bytes,31,opt,name=response_template,json=responseTemplate" json:"response_template,omitempty"`
}

sent to the Handler

func (*DeduplicatedDeviceActivationRequest) Descriptor

func (*DeduplicatedDeviceActivationRequest) Descriptor() ([]byte, []int)

func (*DeduplicatedDeviceActivationRequest) GetActivationMetadata

func (*DeduplicatedDeviceActivationRequest) GetGatewayMetadata

func (m *DeduplicatedDeviceActivationRequest) GetGatewayMetadata() []*gateway.RxMetadata

func (*DeduplicatedDeviceActivationRequest) GetMessage

func (*DeduplicatedDeviceActivationRequest) GetProtocolMetadata

func (m *DeduplicatedDeviceActivationRequest) GetProtocolMetadata() *protocol.RxMetadata

func (*DeduplicatedDeviceActivationRequest) GetResponseTemplate

func (*DeduplicatedDeviceActivationRequest) Marshal

func (m *DeduplicatedDeviceActivationRequest) Marshal() (dAtA []byte, err error)

func (*DeduplicatedDeviceActivationRequest) MarshalPayload

func (m *DeduplicatedDeviceActivationRequest) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*DeduplicatedDeviceActivationRequest) MarshalTo

func (m *DeduplicatedDeviceActivationRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeduplicatedDeviceActivationRequest) ProtoMessage

func (*DeduplicatedDeviceActivationRequest) ProtoMessage()

func (*DeduplicatedDeviceActivationRequest) Reset

func (*DeduplicatedDeviceActivationRequest) Size

func (*DeduplicatedDeviceActivationRequest) String

func (*DeduplicatedDeviceActivationRequest) Unmarshal

func (m *DeduplicatedDeviceActivationRequest) Unmarshal(dAtA []byte) error

func (*DeduplicatedDeviceActivationRequest) UnmarshalPayload

func (m *DeduplicatedDeviceActivationRequest) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*DeduplicatedDeviceActivationRequest) Validate

Validate implements the api.Validator interface

type DeduplicatedUplinkMessage

type DeduplicatedUplinkMessage struct {
	Payload          []byte                                             `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message          *protocol.Message                                  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DevEui           *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui           *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	AppId            string                                             `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	DevId            string                                             `protobuf:"bytes,14,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"`
	ProtocolMetadata *protocol.RxMetadata                               `protobuf:"bytes,21,opt,name=protocol_metadata,json=protocolMetadata" json:"protocol_metadata,omitempty"`
	GatewayMetadata  []*gateway.RxMetadata                              `protobuf:"bytes,22,rep,name=gateway_metadata,json=gatewayMetadata" json:"gateway_metadata,omitempty"`
	ServerTime       int64                                              `protobuf:"varint,23,opt,name=server_time,json=serverTime,proto3" json:"server_time,omitempty"`
	ResponseTemplate *DownlinkMessage                                   `protobuf:"bytes,31,opt,name=response_template,json=responseTemplate" json:"response_template,omitempty"`
}

sent to the Handler

func (*DeduplicatedUplinkMessage) Descriptor

func (*DeduplicatedUplinkMessage) Descriptor() ([]byte, []int)

func (*DeduplicatedUplinkMessage) GetGatewayMetadata

func (m *DeduplicatedUplinkMessage) GetGatewayMetadata() []*gateway.RxMetadata

func (*DeduplicatedUplinkMessage) GetMessage

func (m *DeduplicatedUplinkMessage) GetMessage() *protocol.Message

func (*DeduplicatedUplinkMessage) GetProtocolMetadata

func (m *DeduplicatedUplinkMessage) GetProtocolMetadata() *protocol.RxMetadata

func (*DeduplicatedUplinkMessage) GetResponseTemplate

func (m *DeduplicatedUplinkMessage) GetResponseTemplate() *DownlinkMessage

func (*DeduplicatedUplinkMessage) Marshal

func (m *DeduplicatedUplinkMessage) Marshal() (dAtA []byte, err error)

func (*DeduplicatedUplinkMessage) MarshalPayload

func (m *DeduplicatedUplinkMessage) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*DeduplicatedUplinkMessage) MarshalTo

func (m *DeduplicatedUplinkMessage) MarshalTo(dAtA []byte) (int, error)

func (*DeduplicatedUplinkMessage) ProtoMessage

func (*DeduplicatedUplinkMessage) ProtoMessage()

func (*DeduplicatedUplinkMessage) Reset

func (m *DeduplicatedUplinkMessage) Reset()

func (*DeduplicatedUplinkMessage) Size

func (m *DeduplicatedUplinkMessage) Size() (n int)

func (*DeduplicatedUplinkMessage) String

func (m *DeduplicatedUplinkMessage) String() string

func (*DeduplicatedUplinkMessage) Unmarshal

func (m *DeduplicatedUplinkMessage) Unmarshal(dAtA []byte) error

func (*DeduplicatedUplinkMessage) UnmarshalPayload

func (m *DeduplicatedUplinkMessage) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*DeduplicatedUplinkMessage) Validate

func (m *DeduplicatedUplinkMessage) Validate() error

Validate implements the api.Validator interface

type DeviceActivationRequest

type DeviceActivationRequest struct {
	Payload            []byte                                             `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message            *protocol.Message                                  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DevEui             *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui             *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	ProtocolMetadata   *protocol.RxMetadata                               `protobuf:"bytes,21,opt,name=protocol_metadata,json=protocolMetadata" json:"protocol_metadata,omitempty"`
	GatewayMetadata    *gateway.RxMetadata                                `protobuf:"bytes,22,opt,name=gateway_metadata,json=gatewayMetadata" json:"gateway_metadata,omitempty"`
	ActivationMetadata *protocol.ActivationMetadata                       `protobuf:"bytes,23,opt,name=activation_metadata,json=activationMetadata" json:"activation_metadata,omitempty"`
	DownlinkOptions    []*DownlinkOption                                  `protobuf:"bytes,31,rep,name=downlink_options,json=downlinkOptions" json:"downlink_options,omitempty"`
}

received from the Router

func (*DeviceActivationRequest) Descriptor

func (*DeviceActivationRequest) Descriptor() ([]byte, []int)

func (*DeviceActivationRequest) GetActivationMetadata

func (m *DeviceActivationRequest) GetActivationMetadata() *protocol.ActivationMetadata

func (*DeviceActivationRequest) GetDownlinkOptions

func (m *DeviceActivationRequest) GetDownlinkOptions() []*DownlinkOption

func (*DeviceActivationRequest) GetGatewayMetadata

func (m *DeviceActivationRequest) GetGatewayMetadata() *gateway.RxMetadata

func (*DeviceActivationRequest) GetMessage

func (m *DeviceActivationRequest) GetMessage() *protocol.Message

func (*DeviceActivationRequest) GetProtocolMetadata

func (m *DeviceActivationRequest) GetProtocolMetadata() *protocol.RxMetadata

func (*DeviceActivationRequest) Marshal

func (m *DeviceActivationRequest) Marshal() (dAtA []byte, err error)

func (*DeviceActivationRequest) MarshalPayload

func (m *DeviceActivationRequest) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*DeviceActivationRequest) MarshalTo

func (m *DeviceActivationRequest) MarshalTo(dAtA []byte) (int, error)

func (*DeviceActivationRequest) ProtoMessage

func (*DeviceActivationRequest) ProtoMessage()

func (*DeviceActivationRequest) Reset

func (m *DeviceActivationRequest) Reset()

func (*DeviceActivationRequest) Size

func (m *DeviceActivationRequest) Size() (n int)

func (*DeviceActivationRequest) String

func (m *DeviceActivationRequest) String() string

func (*DeviceActivationRequest) Unmarshal

func (m *DeviceActivationRequest) Unmarshal(dAtA []byte) error

func (*DeviceActivationRequest) UnmarshalPayload

func (m *DeviceActivationRequest) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*DeviceActivationRequest) Validate

func (m *DeviceActivationRequest) Validate() error

Validate implements the api.Validator interface

type DeviceActivationResponse

type DeviceActivationResponse struct {
	Payload        []byte            `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message        *protocol.Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DownlinkOption *DownlinkOption   `protobuf:"bytes,11,opt,name=downlink_option,json=downlinkOption" json:"downlink_option,omitempty"`
}

sent to the Router, used as Template

func (*DeviceActivationResponse) Descriptor

func (*DeviceActivationResponse) Descriptor() ([]byte, []int)

func (*DeviceActivationResponse) GetDownlinkOption

func (m *DeviceActivationResponse) GetDownlinkOption() *DownlinkOption

func (*DeviceActivationResponse) GetMessage

func (m *DeviceActivationResponse) GetMessage() *protocol.Message

func (*DeviceActivationResponse) Marshal

func (m *DeviceActivationResponse) Marshal() (dAtA []byte, err error)

func (*DeviceActivationResponse) MarshalPayload

func (m *DeviceActivationResponse) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*DeviceActivationResponse) MarshalTo

func (m *DeviceActivationResponse) MarshalTo(dAtA []byte) (int, error)

func (*DeviceActivationResponse) ProtoMessage

func (*DeviceActivationResponse) ProtoMessage()

func (*DeviceActivationResponse) Reset

func (m *DeviceActivationResponse) Reset()

func (*DeviceActivationResponse) Size

func (m *DeviceActivationResponse) Size() (n int)

func (*DeviceActivationResponse) String

func (m *DeviceActivationResponse) String() string

func (*DeviceActivationResponse) Unmarshal

func (m *DeviceActivationResponse) Unmarshal(dAtA []byte) error

func (*DeviceActivationResponse) UnmarshalPayload

func (m *DeviceActivationResponse) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

type DownlinkMessage

type DownlinkMessage struct {
	Payload        []byte                                             `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message        *protocol.Message                                  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	DevEui         *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui         *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	AppId          string                                             `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	DevId          string                                             `protobuf:"bytes,14,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"`
	DownlinkOption *DownlinkOption                                    `protobuf:"bytes,21,opt,name=downlink_option,json=downlinkOption" json:"downlink_option,omitempty"`
}

received from the Handler, sent to the Router, used as Template

func (*DownlinkMessage) Descriptor

func (*DownlinkMessage) Descriptor() ([]byte, []int)

func (*DownlinkMessage) GetDownlinkOption

func (m *DownlinkMessage) GetDownlinkOption() *DownlinkOption

func (*DownlinkMessage) GetMessage

func (m *DownlinkMessage) GetMessage() *protocol.Message

func (*DownlinkMessage) Marshal

func (m *DownlinkMessage) Marshal() (dAtA []byte, err error)

func (*DownlinkMessage) MarshalPayload

func (m *DownlinkMessage) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*DownlinkMessage) MarshalTo

func (m *DownlinkMessage) MarshalTo(dAtA []byte) (int, error)

func (*DownlinkMessage) ProtoMessage

func (*DownlinkMessage) ProtoMessage()

func (*DownlinkMessage) Reset

func (m *DownlinkMessage) Reset()

func (*DownlinkMessage) Size

func (m *DownlinkMessage) Size() (n int)

func (*DownlinkMessage) String

func (m *DownlinkMessage) String() string

func (*DownlinkMessage) Unmarshal

func (m *DownlinkMessage) Unmarshal(dAtA []byte) error

func (*DownlinkMessage) UnmarshalPayload

func (m *DownlinkMessage) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*DownlinkMessage) Validate

func (m *DownlinkMessage) Validate() error

Validate implements the api.Validator interface

type DownlinkOption

type DownlinkOption struct {
	Identifier     string                    `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	GatewayId      string                    `protobuf:"bytes,2,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
	Score          uint32                    `protobuf:"varint,3,opt,name=score,proto3" json:"score,omitempty"`
	Deadline       int64                     `protobuf:"varint,4,opt,name=deadline,proto3" json:"deadline,omitempty"`
	ProtocolConfig *protocol.TxConfiguration `protobuf:"bytes,5,opt,name=protocol_config,json=protocolConfig" json:"protocol_config,omitempty"`
	GatewayConfig  *gateway.TxConfiguration  `protobuf:"bytes,6,opt,name=gateway_config,json=gatewayConfig" json:"gateway_config,omitempty"`
}

func (*DownlinkOption) Descriptor

func (*DownlinkOption) Descriptor() ([]byte, []int)

func (*DownlinkOption) GetGatewayConfig

func (m *DownlinkOption) GetGatewayConfig() *gateway.TxConfiguration

func (*DownlinkOption) GetProtocolConfig

func (m *DownlinkOption) GetProtocolConfig() *protocol.TxConfiguration

func (*DownlinkOption) Marshal

func (m *DownlinkOption) Marshal() (dAtA []byte, err error)

func (*DownlinkOption) MarshalTo

func (m *DownlinkOption) MarshalTo(dAtA []byte) (int, error)

func (*DownlinkOption) ProtoMessage

func (*DownlinkOption) ProtoMessage()

func (*DownlinkOption) Reset

func (m *DownlinkOption) Reset()

func (*DownlinkOption) Size

func (m *DownlinkOption) Size() (n int)

func (*DownlinkOption) String

func (m *DownlinkOption) String() string

func (*DownlinkOption) Unmarshal

func (m *DownlinkOption) Unmarshal(dAtA []byte) error

func (*DownlinkOption) Validate

func (m *DownlinkOption) Validate() error

Validate implements the api.Validator interface

type HandlerPublishStream

type HandlerPublishStream interface {
	Stream
	Send(*DownlinkMessage) error
}

HandlerPublishStream for sending downlink messages to the broker

func NewMonitoredHandlerPublishStream

func NewMonitoredHandlerPublishStream(client BrokerClient, getContextFunc func() context.Context) HandlerPublishStream

NewMonitoredHandlerPublishStream starts and monitors a HandlerPublishStream

type HandlerSubscribeStream

type HandlerSubscribeStream interface {
	Stream
	Channel() <-chan *DeduplicatedUplinkMessage
}

HandlerSubscribeStream for receiving uplink messages

func NewMonitoredHandlerSubscribeStream

func NewMonitoredHandlerSubscribeStream(client BrokerClient, getContextFunc func() context.Context) HandlerSubscribeStream

NewMonitoredHandlerSubscribeStream starts and monitors a HandlerSubscribeStream

type RouterStream

type RouterStream interface {
	Stream
	Send(*UplinkMessage) error
	Channel() <-chan *DownlinkMessage
}

RouterStream for sending gateway statuses

func NewMonitoredRouterStream

func NewMonitoredRouterStream(client BrokerClient, getContextFunc func() context.Context) RouterStream

NewMonitoredRouterStream starts and monitors a RouterStream

type Status

type Status struct {
	System            *api.SystemStats    `protobuf:"bytes,1,opt,name=system" json:"system,omitempty"`
	Component         *api.ComponentStats `protobuf:"bytes,2,opt,name=component" json:"component,omitempty"`
	Uplink            *api.Rates          `protobuf:"bytes,11,opt,name=uplink" json:"uplink,omitempty"`
	UplinkUnique      *api.Rates          `protobuf:"bytes,12,opt,name=uplink_unique,json=uplinkUnique" json:"uplink_unique,omitempty"`
	Downlink          *api.Rates          `protobuf:"bytes,13,opt,name=downlink" json:"downlink,omitempty"`
	Activations       *api.Rates          `protobuf:"bytes,14,opt,name=activations" json:"activations,omitempty"`
	ActivationsUnique *api.Rates          `protobuf:"bytes,15,opt,name=activations_unique,json=activationsUnique" json:"activations_unique,omitempty"`
	Deduplication     *api.Percentiles    `protobuf:"bytes,16,opt,name=deduplication" json:"deduplication,omitempty"`
	// Connections
	ConnectedRouters  uint32 `protobuf:"varint,21,opt,name=connected_routers,json=connectedRouters,proto3" json:"connected_routers,omitempty"`
	ConnectedHandlers uint32 `protobuf:"varint,22,opt,name=connected_handlers,json=connectedHandlers,proto3" json:"connected_handlers,omitempty"`
}

func (*Status) Descriptor

func (*Status) Descriptor() ([]byte, []int)

func (*Status) GetActivations

func (m *Status) GetActivations() *api.Rates

func (*Status) GetActivationsUnique

func (m *Status) GetActivationsUnique() *api.Rates

func (*Status) GetComponent

func (m *Status) GetComponent() *api.ComponentStats

func (*Status) GetDeduplication

func (m *Status) GetDeduplication() *api.Percentiles
func (m *Status) GetDownlink() *api.Rates

func (*Status) GetSystem

func (m *Status) GetSystem() *api.SystemStats
func (m *Status) GetUplink() *api.Rates

func (*Status) GetUplinkUnique

func (m *Status) GetUplinkUnique() *api.Rates

func (*Status) Marshal

func (m *Status) Marshal() (dAtA []byte, err error)

func (*Status) MarshalTo

func (m *Status) MarshalTo(dAtA []byte) (int, error)

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) Size

func (m *Status) Size() (n int)

func (*Status) String

func (m *Status) String() string

func (*Status) Unmarshal

func (m *Status) Unmarshal(dAtA []byte) error

type StatusRequest

type StatusRequest struct {
}

message StatusRequest is used to request the status of this Broker

func (*StatusRequest) Descriptor

func (*StatusRequest) Descriptor() ([]byte, []int)

func (*StatusRequest) Marshal

func (m *StatusRequest) Marshal() (dAtA []byte, err error)

func (*StatusRequest) MarshalTo

func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error)

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) Reset

func (m *StatusRequest) Reset()

func (*StatusRequest) Size

func (m *StatusRequest) Size() (n int)

func (*StatusRequest) String

func (m *StatusRequest) String() string

func (*StatusRequest) Unmarshal

func (m *StatusRequest) Unmarshal(dAtA []byte) error

type Stream

type Stream interface {
	SetLogger(log.Interface)
	Close()
}

Stream interface

type SubscribeRequest

type SubscribeRequest struct {
}

message SubscribeRequest is used by a Handler to subscribe to uplink messages

func (*SubscribeRequest) Descriptor

func (*SubscribeRequest) Descriptor() ([]byte, []int)

func (*SubscribeRequest) Marshal

func (m *SubscribeRequest) Marshal() (dAtA []byte, err error)

func (*SubscribeRequest) MarshalTo

func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error)

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) Reset

func (m *SubscribeRequest) Reset()

func (*SubscribeRequest) Size

func (m *SubscribeRequest) Size() (n int)

func (*SubscribeRequest) String

func (m *SubscribeRequest) String() string

func (*SubscribeRequest) Unmarshal

func (m *SubscribeRequest) Unmarshal(dAtA []byte) error

type UplinkMessage

type UplinkMessage struct {
	Payload []byte            `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	Message *protocol.Message `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
	// NOTE: For LoRaWAN, the Router doesn't know the DevEUI/ID and AppEUI/ID
	DevEui           *github_com_TheThingsNetwork_ttn_core_types.DevEUI `` /* 141-byte string literal not displayed */
	AppEui           *github_com_TheThingsNetwork_ttn_core_types.AppEUI `` /* 141-byte string literal not displayed */
	AppId            string                                             `protobuf:"bytes,13,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
	DevId            string                                             `protobuf:"bytes,14,opt,name=dev_id,json=devId,proto3" json:"dev_id,omitempty"`
	ProtocolMetadata *protocol.RxMetadata                               `protobuf:"bytes,21,opt,name=protocol_metadata,json=protocolMetadata" json:"protocol_metadata,omitempty"`
	GatewayMetadata  *gateway.RxMetadata                                `protobuf:"bytes,22,opt,name=gateway_metadata,json=gatewayMetadata" json:"gateway_metadata,omitempty"`
	DownlinkOptions  []*DownlinkOption                                  `protobuf:"bytes,31,rep,name=downlink_options,json=downlinkOptions" json:"downlink_options,omitempty"`
}

received from the Router

func (*UplinkMessage) Descriptor

func (*UplinkMessage) Descriptor() ([]byte, []int)

func (*UplinkMessage) GetDownlinkOptions

func (m *UplinkMessage) GetDownlinkOptions() []*DownlinkOption

func (*UplinkMessage) GetGatewayMetadata

func (m *UplinkMessage) GetGatewayMetadata() *gateway.RxMetadata

func (*UplinkMessage) GetMessage

func (m *UplinkMessage) GetMessage() *protocol.Message

func (*UplinkMessage) GetProtocolMetadata

func (m *UplinkMessage) GetProtocolMetadata() *protocol.RxMetadata

func (*UplinkMessage) Marshal

func (m *UplinkMessage) Marshal() (dAtA []byte, err error)

func (*UplinkMessage) MarshalPayload

func (m *UplinkMessage) MarshalPayload() error

MarshalPayload marshals the Message into Payload if Payload is nil

func (*UplinkMessage) MarshalTo

func (m *UplinkMessage) MarshalTo(dAtA []byte) (int, error)

func (*UplinkMessage) ProtoMessage

func (*UplinkMessage) ProtoMessage()

func (*UplinkMessage) Reset

func (m *UplinkMessage) Reset()

func (*UplinkMessage) Size

func (m *UplinkMessage) Size() (n int)

func (*UplinkMessage) String

func (m *UplinkMessage) String() string

func (*UplinkMessage) Unmarshal

func (m *UplinkMessage) Unmarshal(dAtA []byte) error

func (*UplinkMessage) UnmarshalPayload

func (m *UplinkMessage) UnmarshalPayload() error

UnmarshalPayload unmarshals the Payload into Message if Message is nil

func (*UplinkMessage) Validate

func (m *UplinkMessage) Validate() error

Validate implements the api.Validator interface

Jump to

Keyboard shortcuts

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