skipper: Index | Files

package innkeeper

import ""

Package innkeeper implements a DataClient for reading skipper route definitions from an Innkeeper service.

(See the DataClient interface in the skipper/routing package.)

Innkeeper is a service to maintain large sets of routes in a multi-user environment with OAuth2 authentication and permission scopes.



Package Files

client.go clientauth.go eskiptojson.go

type AuthOptions Uses

type AuthOptions struct {
    InnkeeperAuthToken  string
    OAuthCredentialsDir string
    OAuthUrl            string
    OAuthScope          string

type Authentication Uses

type Authentication interface {
    GetToken() (string, error)

An Authentication object provides authentication to Innkeeper.

func CreateInnkeeperAuthentication Uses

func CreateInnkeeperAuthentication(o AuthOptions) Authentication

type Client Uses

type Client struct {
    // contains filtered or unexported fields

A Client is used to load the whole set of routes and the updates from an Innkeeper service.

func New Uses

func New(o Options) (*Client, error)

Returns a new Client.

func (*Client) DeleteAllIf Uses

func (c *Client) DeleteAllIf(routes []*eskip.Route, cond eskip.RoutePredicate) error

func (*Client) LoadAll Uses

func (c *Client) LoadAll() ([]*eskip.Route, error)

Returns all active routes from Innkeeper.

func (*Client) LoadAndParseAll Uses

func (c *Client) LoadAndParseAll() ([]*eskip.RouteInfo, error)

func (*Client) LoadUpdate Uses

func (c *Client) LoadUpdate() ([]*eskip.Route, []string, error)

Returns all new and deleted routes from Innkeeper since the last LoadAll request.

func (*Client) UpsertAll Uses

func (c *Client) UpsertAll(routes []*eskip.Route) error

type FixedToken Uses

type FixedToken string

A FixedToken provides Innkeeper authentication by an unchanged token string.

func (FixedToken) GetToken Uses

func (ft FixedToken) GetToken() (string, error)

Returns the fixed token.

type Options Uses

type Options struct {

    // The network address where the Innkeeper API is accessible.
    Address string

    // When true, TLS certificate verification is skipped.
    Insecure bool

    // Authentication to be used when connecting to Innkeeper.
    Authentication Authentication

    // An eskip filter chain expression to prepend to each route loaded
    // from Innkeeper. (E.g. "filter1() -> filter2() -> filter3()")
    PreRouteFilters string

    // An eskip filter chain expression to append to each route loaded
    // from Innkeeper. (E.g. "filter1() -> filter2() -> filter3()")
    PostRouteFilters string

Initialization options for the Innkeeper client.

Package innkeeper imports 12 packages (graph) and is imported by 7 packages. Updated 2019-05-20. Refresh now. Tools for package owners.