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" "github.com/aureliar8/ttn-fork/pkg/auth/cluster" ) func main() { var ( // Assume this comes from a hypothetical inter-cluster RPC call. ctx context.Context ) if err := cluster.Authorized(ctx); err != nil { // return err } }
Output:
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.