sys

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

package sys is used to configure a vlpoc cluster. The other packages in the API will rely on this configuration to perform their work.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthConnstr

func AuthConnstr(ctx context.Context) string

AuthConnstr returns a connection string that can be used to connect to the authsrv.

func CAPath

func CAPath(ctx context.Context) string

CAPath returns a local path to the CA Certificate for the configured vlpoc cluster.

func Config

func Config(ctx context.Context, sysDomain, CAPath string, opts ...Option) (context.Context, error)

Config injects vlpoc configuration into a context.Context. Required configuration is the system's base domain (sysDomain) and the path to the system's certificate authority cert (CAPath), to validate other certs from the system.

Other configuration is achieved through Options.

func Domain

func Domain(ctx context.Context) string

Domain returns the currently-configured vlpoc domain from the Context.

Types

type Option

type Option func(*config)

Options are used to configure a context for use in a vlpoc cluster.

func WithAuthHost

func WithAuthHost(host string) Option

WithAuthHost sets the subdomain at which the authsrv can be reached. This is "auth" by default.

func WithAuthPort

func WithAuthPort(port uint16) Option

WithAuthPort sets the port at which the authsrv can be reached. This is 8181 by default.

Jump to

Keyboard shortcuts

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