loader

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvLoader

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

func NewEnvLoader

func NewEnvLoader(certChannel chan *tls.Certificate, client bool, cert, key, ca string, interval time.Duration, logger zLogger.ZLogger) *EnvLoader

func (*EnvLoader) Close

func (f *EnvLoader) Close() error

func (*EnvLoader) GetCA

func (f *EnvLoader) GetCA() []byte

func (*EnvLoader) Start

func (f *EnvLoader) Start() error

type FileLoader

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

func NewFileLoader

func NewFileLoader(certChannel chan *tls.Certificate, client bool, cert, key, ca string, interval time.Duration, logger zLogger.ZLogger) *FileLoader

func (*FileLoader) Close

func (f *FileLoader) Close() error

func (*FileLoader) GetCA

func (f *FileLoader) GetCA() []byte

func (*FileLoader) Start

func (f *FileLoader) Start() (err error)

type Loader

type Loader interface {
	io.Closer
	Start() error
	GetCA() []byte
}

func CreateClientLoader

func CreateClientLoader(conf *TLSConfig, logger zLogger.ZLogger) (tlsConfig *tls.Config, l Loader, err error)

func CreateServerLoader

func CreateServerLoader(mutual bool, conf *TLSConfig, uris []string, logger zLogger.ZLogger) (tlsConfig *tls.Config, l Loader, err error)

func NewDevLoader added in v2.0.3

func NewDevLoader(certChannel chan *tls.Certificate, client bool) Loader

type TLSConfig

type TLSConfig struct {
	Type     string              `json:"type,omitempty" toml:"type"` // "ENV", "FILE", "SERVICE" OR "SELF"
	Cert     string              `json:"cert,omitempty" toml:"cert"`
	Key      string              `json:"key,omitempty" toml:"key"`
	CA       string              `json:"ca,omitempty" toml:"ca"`
	Interval configutil.Duration `json:"interval,omitempty" toml:"interval"`
}

Jump to

Keyboard shortcuts

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