connector

package
v0.0.0-...-fb28d3e Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicRabbitConnector

type BasicRabbitConnector struct {
	BasicRabbitDialer RabbitDialer
}

func CreateBasicRabbitConnector

func CreateBasicRabbitConnector() *BasicRabbitConnector

func (*BasicRabbitConnector) CreateConnection

func (c *BasicRabbitConnector) CreateConnection(connectionURL string) (*amqp.Connection, error)

type BasicRabbitDialer

type BasicRabbitDialer struct {
}

func (*BasicRabbitDialer) Dial

func (s *BasicRabbitDialer) Dial(connectionURL string) (*amqp.Connection, error)

type CertPoolMaker

type CertPoolMaker interface {
	NewCertPoolWithAppendedCa(caCert []byte) *x509.CertPool
}

type FileReader

type FileReader interface {
	ReadFile(filename string) ([]byte, error)
}

type IOFileReader

type IOFileReader struct {
}

func (*IOFileReader) ReadFile

func (i *IOFileReader) ReadFile(filename string) ([]byte, error)

type KeyLoader

type KeyLoader interface {
	LoadKeyPair(certFile, keyFile string) (tls.Certificate, error)
}

type RabbitConnector

type RabbitConnector interface {
	CreateConnection(connectionURL string) (*amqp.Connection, error)
}

func CreateConnector

func CreateConnector(connectionURL string) RabbitConnector

type RabbitDialer

type RabbitDialer interface {
	Dial(connectionURL string) (*amqp.Connection, error)
}

type TlsRabbitConnector

type TlsRabbitConnector struct {
	TlsConfig     *tls.Config
	FileReader    FileReader
	CertPoolMaker CertPoolMaker
	KeyLoader     KeyLoader
	TlsDialer     TlsRabbitDialer
}

func CreateTlsRabbitConnector

func CreateTlsRabbitConnector() *TlsRabbitConnector

func (*TlsRabbitConnector) CreateConnection

func (c *TlsRabbitConnector) CreateConnection(connectionURL string) (*amqp.Connection, error)

type TlsRabbitDialer

type TlsRabbitDialer interface {
	DialTLS(connectionURL string, tlsConfig *tls.Config) (*amqp.Connection, error)
}

type X509CertPoolMaker

type X509CertPoolMaker struct {
}

func (*X509CertPoolMaker) NewCertPoolWithAppendedCa

func (x *X509CertPoolMaker) NewCertPoolWithAppendedCa(caCert []byte) *x509.CertPool

type X509KeyPairLoader

type X509KeyPairLoader struct {
}

func (*X509KeyPairLoader) LoadKeyPair

func (x *X509KeyPairLoader) LoadKeyPair(certFile string, keyFile string) (tls.Certificate, error)

type X509TlsDialer

type X509TlsDialer struct {
}

func (*X509TlsDialer) DialTLS

func (s *X509TlsDialer) DialTLS(connectionURL string, tlsConfig *tls.Config) (*amqp.Connection, error)

Jump to

Keyboard shortcuts

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