Documentation
¶
Overview ¶
Package cluster contains cluster authentication-related utilities.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// AuthType used to identify components.
AuthType = "ClusterKey"
)
Functions ¶
func Authorized ¶
Authorized returns whether the context has been identified as a cluster call. It panics if it does not inherit from `NewContext`.
Example ¶
package main
import (
"context"
"go.thethings.network/lorawan-stack/v3/pkg/auth/cluster"
)
func main() {
// Assume this comes from a hypothetical inter-cluster RPC call.
var ctx context.Context
if err := cluster.Authorized(ctx); err != nil {
// return err
}
}
func NewContext ¶
NewContext returns a context containing the cluster authentication result.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.