ttgc

package
v3.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package ttgc provides functions to use The Things Gateway Controller.

Package ttgc provides functions to use The Things Gateway Controller.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Upstream

type Upstream struct {
	// contains filtered or unexported fields
}

Upstream is the client for The Things Gateway Controller.

func New

func New(ctx context.Context, c ttgc.Component, config ttgc.Config) (*Upstream, error)

New returns a new upstream client for The Things Gateway Controller.

func (*Upstream) Claim

func (u *Upstream) Claim(
	ctx context.Context, eui types.EUI64, ownerToken, clusterAddress string,
) (*dcstypes.GatewayMetadata, error)

Claim implements gateways.GatewayClaimer. Claim does four things:

  1. Claim the gateway
  2. Upsert a LoRa Packet Forwarder profile with the root CA presented by the given Gateway Server
  3. Upsert a Geolocation profile
  4. Update the gateway with the profiles

func (*Upstream) IsManagedGateway

func (*Upstream) IsManagedGateway(context.Context, types.EUI64) (bool, error)

IsManagedGateway implements gateways.GatewayClaimer. This method always returns true.

func (*Upstream) Unclaim

func (u *Upstream) Unclaim(ctx context.Context, eui types.EUI64) error

Unclaim implements gateways.GatewayClaimer.

Jump to

Keyboard shortcuts

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