Documentation ¶
Index ¶
- Constants
- Variables
- func ClientCert(secret *v1.Secret) nats.Option
- func LoadEventingNatsConfig(configMap map[string]string) (config commonconfig.EventingNatsConfig, err error)
- func NewNatsConn(ctx context.Context, config commonconfig.EventingNatsConfig) (*nats.Conn, error)
- func RootCA(caBundle []byte) nats.Option
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 ¶
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)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.