nats

package
v0.37.5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TLSCaCertKey = "ca.crt"
)

Variables

View Source
var (
	ErrBadCredentialFileOption = errors.New("bad auth.credentialFile option")
	ErrBadMTLSOption           = errors.New("bad auth.tls option")
	ErrBadTLSOption            = errors.New("bad tls option")
)
View Source
var (
	ErrTLSCertMissing       = fmt.Errorf("%s missing", v1.TLSCertKey)
	ErrTLSPrivateKeyMissing = fmt.Errorf("%s missing", v1.TLSPrivateKeyKey)
	ErrTLSCaCertMissing     = fmt.Errorf("%s missing", TLSCaCertKey)
	ErrTLSSecretNotValid    = fmt.Errorf("TLS secret not of type %s", v1.SecretTypeTLS)
)

Functions

func ClientCert

func ClientCert(secret *v1.Secret) nats.Option

ClientCert is similar to nats.ClientCert() except it accepts the data from a v1.Secret instead of reading from the file system. Passing a nil secret to this option is a no-op.

func LoadEventingNatsConfig

func LoadEventingNatsConfig(configMap map[string]string) (config commonconfig.EventingNatsConfig, err error)

func NewNatsConn

func NewNatsConn(ctx context.Context, config commonconfig.EventingNatsConfig) (*nats.Conn, error)

func RootCA

func RootCA(caBundle []byte) nats.Option

RootCA is similar to nats.RootCAs() except it accepts a certificate directly, instead of reading from the file system.

Types

This section is empty.

Jump to

Keyboard shortcuts

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