server

package
v0.0.0-...-a606d81 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TerminateRole is the role a hks jwt token needs to be signed
	// with to be authenticated to make a request to the /terminate route
	TerminateRole = "terminate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HKSCustomClaim

type HKSCustomClaim struct {
	Metadata struct {
		Roles []string `json:"https://hks.io/roles"`
	} `json:"metadata"`
	jwt.StandardClaims
}

HKSCustomClaim allows us to reference custom properties in the claim of a JWT

type HKSServer

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

HKSServer defines the server

func New

func New() *HKSServer

New creates a new server

func (*HKSServer) Run

func (hks *HKSServer) Run()

Run is exported for main agent to start server, which is what hks uses to talk with the cluster

type HandlerFunc

type HandlerFunc func(http.Handler) http.Handler

HandlerFunc defines the function signature for a middleware function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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