Documentation ¶
Overview ¶
Package gateways provides functions to claim gateways.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseGatewayEUIRanges ¶
ParseGatewayEUIRanges parses the configured upstream map and returns map of ranges.
Types ¶
type Claimer ¶
type Claimer interface { // Claim claims a gateway. Claim( ctx context.Context, eui types.EUI64, ownerToken string, clusterAddress string, ) (*dcstypes.GatewayMetadata, error) // Unclaim unclaims a gateway. Unclaim(ctx context.Context, eui types.EUI64) error // IsManagedGateway returns true if the gateway is a managed gateway. IsManagedGateway(ctx context.Context, eui types.EUI64) (bool, error) }
Claimer provides methods for claiming Gateways.
type Component ¶
type Component interface { GetBaseConfig(context.Context) config.ServiceBase GetTLSClientConfig(context.Context, ...tlsconfig.Option) (*tls.Config, error) }
Component is the interface to the component.
type Config ¶
type Config struct { CreateOnNotFound bool `name:"create-on-not-found" description:"DEPRECATED"` // nolint:lll DefaultGatewayServerAddress string `name:"default-gateway-server-address" description:"The default Gateway Server Address"` // nolint:lll Upstreams map[string][]string `name:"upstreams" description:"Map of upstream type and the supported Gateway EUI ranges"` // nolint:lll }
Config is the configuration for the Gateway Claiming Server.
type Option ¶
type Option func(*Upstream)
Option configures Upstream.
func WithClaimer ¶
func WithClaimer(name string, ranges []dcstypes.EUI64Range, claimer Claimer) Option
WithClaimer adds a claimer to Upstream.
type Upstream ¶
type Upstream struct {
// contains filtered or unexported fields
}
Upstream is a gateway claiming upstream.
Click to show internal directories.
Click to hide internal directories.