Documentation ¶
Overview ¶
Package enddevices provides functions to configure End Device claiming clients.
Index ¶
- Constants
- type Component
- type Config
- type EndDeviceClaimer
- type NetworkServer
- type Option
- type Upstream
- func (upstream *Upstream) Claim(ctx context.Context, joinEUI, devEUI types.EUI64, ...) error
- func (upstream *Upstream) GetClaimStatus(ctx context.Context, in *ttnpb.EndDeviceIdentifiers) (*ttnpb.GetClaimStatusResponse, error)
- func (upstream *Upstream) GetInfoByJoinEUI(ctx context.Context, in *ttnpb.GetInfoByJoinEUIRequest) (*ttnpb.GetInfoByJoinEUIResponse, error)
- func (upstream *Upstream) Unclaim(ctx context.Context, in *ttnpb.EndDeviceIdentifiers) (*pbtypes.Empty, error)
Constants ¶
const JSClientConfigurationName = "config.yml"
JSClientConfigurationName is the filename of Join Server client configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component interface { httpclient.Provider GetBaseConfig(ctx context.Context) config.ServiceBase GetPeerConn(ctx context.Context, role ttnpb.ClusterRole, ids cluster.EntityIdentifiers) (*grpc.ClientConn, error) AllowInsecureForCredentials() bool }
Component abstracts the underlying *component.Component.
type Config ¶
type Config struct { NetID types.NetID `name:"net-id" description:"NetID of this network to configure as home NetID when claiming"` NetworkServer NetworkServer `name:"network-server" description:"Network Server of the cluster that handles claimed device traffic"` Source string `name:"source" description:"Source of the file containing Join Server settings (directory, url, blob)"` Directory string `name:"directory" description:"OS filesystem directory, which contains the config.yml and the client-specific files"` URL string `name:"url" description:"URL, which contains Join Server client configuration"` Blob config.BlobPathConfig `name:"blob"` }
Config contains options for end device claiming clients.
type EndDeviceClaimer ¶
type EndDeviceClaimer interface { // SupportsJoinEUI returns whether the Join Server supports this JoinEUI. SupportsJoinEUI(joinEUI types.EUI64) bool // Claim claims an End Device. Claim(ctx context.Context, joinEUI, devEUI types.EUI64, claimAuthenticationCode string) error // GetClaimStatus returns the claim status an End Device. GetClaimStatus(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers) (*ttnpb.GetClaimStatusResponse, error) // Unclaim releases the claim on an End Device. Unclaim(ctx context.Context, ids *ttnpb.EndDeviceIdentifiers) (err error) }
EndDeviceClaimer provides methods for Claiming End Devices on (external) Join Server.
type NetworkServer ¶ added in v3.19.2
type NetworkServer struct { Hostname string `name:"hostname" description:"Hostname of the Network Server. Must not contain a port"` HomeNSID types.EUI64 `name:"home-ns-id" description:"HomeNSID of the Network Server (EUI)"` }
NetworkServer contains information related to the Network Server.
type Option ¶
type Option func(*Upstream)
Option configures Upstream.
func WithDeviceRegistry ¶
func WithDeviceRegistry(reg ttnpb.EndDeviceRegistryClient) Option
WithDeviceRegistry overrides the device registry of the Upstream.
type Upstream ¶
type Upstream struct { Component // contains filtered or unexported fields }
Upstream abstracts EndDeviceClaimingServer.
func NewUpstream ¶
NewUpstream returns a new Upstream.
func (*Upstream) Claim ¶
func (upstream *Upstream) Claim(ctx context.Context, joinEUI, devEUI types.EUI64, claimAuthenticationCode string) error
Claim implements EndDeviceClaimingServer.
func (*Upstream) GetClaimStatus ¶
func (upstream *Upstream) GetClaimStatus(ctx context.Context, in *ttnpb.EndDeviceIdentifiers) (*ttnpb.GetClaimStatusResponse, error)
GetClaimStatus implements EndDeviceClaimingServer.
func (*Upstream) GetInfoByJoinEUI ¶
func (upstream *Upstream) GetInfoByJoinEUI(ctx context.Context, in *ttnpb.GetInfoByJoinEUIRequest) (*ttnpb.GetInfoByJoinEUIResponse, error)
GetInfoByJoinEUI implements EndDeviceClaimingServer.