Documentation ¶
Index ¶
- type Client
- type ClientBuilder
- func (b *ClientBuilder) Build(conf *viper.Viper) (*Client, error)
- func (b *ClientBuilder) Insecure() *ClientBuilder
- func (b *ClientBuilder) WithDomainOverride(serverDomainOverride string) *ClientBuilder
- func (b *ClientBuilder) WithJWSToken(jwsToken string) *ClientBuilder
- func (b *ClientBuilder) WithTLS(certFile string) *ClientBuilder
- type OnChangeHandler
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 ¶
UpdateConfig read the configuration from the vecosy server and update viper
func (*Client) WatchChanges ¶
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