vecosy

package
v2.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	AppName     string
	AppVersion  string
	Environment string
	// contains filtered or unexported fields
}

Client represent a vecosy client

func (*Client) AddOnChangeHandler

func (vc *Client) AddOnChangeHandler(handler OnChangeHandler)

AddOnChangeHandler add a new changes handler to the client

func (*Client) UpdateConfig

func (vc *Client) UpdateConfig() error

UpdateConfig read the configuration from the vecosy server and update viper

func (*Client) WatchChanges

func (vc *Client) WatchChanges() error

WatchChanges will start receiving the configuration changes from the vecosy server

type ClientBuilder

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

ClientBuilder represent a client initialization builder

func NewClientBuilder

func NewClientBuilder(vecosyServer, appName, appVersion, environment string) *ClientBuilder

NewClientBuilder create a new ClientBuilder instance

func (*ClientBuilder) Build

func (b *ClientBuilder) Build(conf *viper.Viper) (*Client, error)

Build will generate a new vecosy client configuration

func (*ClientBuilder) Insecure

func (b *ClientBuilder) Insecure() *ClientBuilder

Insecure disable the JWS authentication

func (*ClientBuilder) WithDomainOverride

func (b *ClientBuilder) WithDomainOverride(serverDomainOverride string) *ClientBuilder

WithDomainOverride TEST ONLY: override the TLS server domain validation

func (*ClientBuilder) WithJWSToken

func (b *ClientBuilder) WithJWSToken(jwsToken string) *ClientBuilder

WithJWSToken enables the JWS authentication

func (*ClientBuilder) WithTLS

func (b *ClientBuilder) WithTLS(certFile string) *ClientBuilder

WithTLS enable the TLS

type OnChangeHandler

type OnChangeHandler = func(oldSettings map[string]interface{})

OnChangeHandler handler executed on every configuration changes

Jump to

Keyboard shortcuts

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