endpoint

package
v0.0.0-...-20522ef Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Local protocol
	Local = Protocol("local")
	// HTTP protocol
	HTTP = Protocol("http")
	// Disque protocol
	Disque = Protocol("disque")
	// GRPC protocol
	GRPC = Protocol("grpc")
	// Redis protocol
	Redis = Protocol("redis")
	// Kafka protocol
	Kafka = Protocol("kafka")
	// MQTT protocol
	MQTT = Protocol("mqtt")
	// AMQP protocol
	AMQP = Protocol("amqp")
	// SQS protocol
	SQS = Protocol("sqs")
	// Google Cloud Pubsub protocol
	PubSub = Protocol("pubsub")
	// NATS protocol
	NATS = Protocol("nats")
	// EventHub protocol
	EventHub = Protocol("sb")
)

Variables

Functions

This section is empty.

Types

type AMQPConn

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

AMQPConn is an endpoint connection

func (*AMQPConn) ExpireNow

func (conn *AMQPConn) ExpireNow()

ExpireNow forces the connection to expire

func (*AMQPConn) Expired

func (conn *AMQPConn) Expired() bool

Expired returns true if the connection has expired

func (*AMQPConn) Send

func (conn *AMQPConn) Send(msg string) error

Send sends a message

type Conn

type Conn interface {
	ExpireNow()
	Expired() bool
	Send(val string) error
}

Conn is an endpoint connection

type DisqueConn

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

DisqueConn is an endpoint connection

func (*DisqueConn) ExpireNow

func (conn *DisqueConn) ExpireNow()

ExpireNow forces the connection to expire

func (*DisqueConn) Expired

func (conn *DisqueConn) Expired() bool

Expired returns true if the connection has expired

func (*DisqueConn) Send

func (conn *DisqueConn) Send(msg string) error

Send sends a message

type Endpoint

type Endpoint struct {
	Protocol Protocol
	Original string
	GRPC     struct {
		Host string
		Port int
	}
	Disque struct {
		Host      string
		Port      int
		QueueName string
		Options   struct {
			Replicate int
		}
	}
	Redis struct {
		Host    string
		Port    int
		Channel string
	}
	Kafka struct {
		Host       string
		Port       int
		TopicName  string
		Auth       string
		SSL        bool
		SASLSHA256 bool
		SASLSHA512 bool
		CACertFile string
		CertFile   string
		KeyFile    string
	}
	AMQP struct {
		URI          string
		SSL          bool
		QueueName    string
		RouteKey     string
		Type         string
		Durable      bool
		AutoDelete   bool
		Internal     bool
		NoWait       bool
		Mandatory    bool
		Immediate    bool
		DeliveryMode uint8
		Priority     uint8
	}
	MQTT struct {
		Host       string
		Port       int
		QueueName  string
		Qos        byte
		Retained   bool
		CACertFile string
		CertFile   string
		KeyFile    string
	}
	PubSub struct {
		Project  string
		Topic    string
		CredPath string
	}
	SQS struct {
		PlainURL    string
		QueueID     string
		Region      string
		CredPath    string
		CredProfile string
		QueueName   string
		CreateQueue bool
	}
	NATS struct {
		Host    string
		Port    int
		User    string
		Pass    string
		Topic   string
		Token   string
		TLS     bool
		TLSCert string
		TLSKey  string
	}
	EventHub struct {
		ConnectionString string
	}
	Local struct {
		Channel string
	}
}

Endpoint represents an endpoint.

type EvenHubConn

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

HTTPConn is an endpoint connection

func (*EvenHubConn) ExpireNow

func (conn *EvenHubConn) ExpireNow()

ExpireNow forces the connection to expire

func (*EvenHubConn) Expired

func (conn *EvenHubConn) Expired() bool

Expired returns true if the connection has expired

func (*EvenHubConn) Send

func (conn *EvenHubConn) Send(msg string) error

Send sends a message

type GRPCConn

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

GRPCConn is an endpoint connection

func (*GRPCConn) ExpireNow

func (conn *GRPCConn) ExpireNow()

ExpireNow forces the connection to expire

func (*GRPCConn) Expired

func (conn *GRPCConn) Expired() bool

Expired returns true if the connection has expired

func (*GRPCConn) Send

func (conn *GRPCConn) Send(msg string) error

Send sends a message

type HTTPConn

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

HTTPConn is an endpoint connection

func (*HTTPConn) ExpireNow

func (conn *HTTPConn) ExpireNow()

ExpireNow forces the connection to expire

func (*HTTPConn) Expired

func (conn *HTTPConn) Expired() bool

Expired returns true if the connection has expired

func (*HTTPConn) Send

func (conn *HTTPConn) Send(msg string) error

Send sends a message

type KafkaConn

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

KafkaConn is an endpoint connection

func (*KafkaConn) ExpireNow

func (conn *KafkaConn) ExpireNow()

ExpireNow forces the connection to expire

func (*KafkaConn) Expired

func (conn *KafkaConn) Expired() bool

Expired returns true if the connection has expired

func (*KafkaConn) Send

func (conn *KafkaConn) Send(msg string) error

Send sends a message

type LocalConn

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

LocalConn is an endpoint connection

func (*LocalConn) ExpireNow

func (conn *LocalConn) ExpireNow()

ExpireNow forces the connection to expire

func (*LocalConn) Expired

func (conn *LocalConn) Expired() bool

Expired returns true if the connection has expired

func (*LocalConn) Send

func (conn *LocalConn) Send(msg string) error

Send sends a message

type LocalPublisher

type LocalPublisher interface {
	Publish(channel string, message ...string) int
}

LocalPublisher is used to publish local notifcations

type MQTTConn

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

MQTTConn is an endpoint connection

func (*MQTTConn) ExpireNow

func (conn *MQTTConn) ExpireNow()

ExpireNow forces the connection to expire

func (*MQTTConn) Expired

func (conn *MQTTConn) Expired() bool

Expired returns true if the connection has expired

func (*MQTTConn) Send

func (conn *MQTTConn) Send(msg string) error

Send sends a message

type Manager

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

Manager manages all endpoints

func NewManager

func NewManager(publisher LocalPublisher) *Manager

NewManager returns a new manager

func (*Manager) Send

func (epc *Manager) Send(endpoint, msg string) error

Send send a message to an endpoint

func (*Manager) Shutdown

func (epc *Manager) Shutdown()

func (*Manager) Validate

func (epc *Manager) Validate(url string) error

Validate an endpoint url

type NATSConn

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

NATSConn is an endpoint connection

func (*NATSConn) ExpireNow

func (conn *NATSConn) ExpireNow()

ExpireNow forces the connection to expire

func (*NATSConn) Expired

func (conn *NATSConn) Expired() bool

Expired returns true if the connection has expired

func (*NATSConn) Send

func (conn *NATSConn) Send(msg string) error

Send sends a message

type Protocol

type Protocol string

Protocol is the type of protocol that the endpoint represents.

type PubSubConn

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

SQSConn is an endpoint connection

func (*PubSubConn) ExpireNow

func (conn *PubSubConn) ExpireNow()

ExpireNow forces the connection to expire

func (*PubSubConn) Expired

func (conn *PubSubConn) Expired() bool

func (*PubSubConn) Send

func (conn *PubSubConn) Send(msg string) error

Send sends a message

type RedisConn

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

RedisConn is an endpoint connection

func (*RedisConn) ExpireNow

func (conn *RedisConn) ExpireNow()

ExpireNow forces the connection to expire

func (*RedisConn) Expired

func (conn *RedisConn) Expired() bool

Expired returns true if the connection has expired

func (*RedisConn) Send

func (conn *RedisConn) Send(msg string) error

Send sends a message

type SQSConn

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

SQSConn is an endpoint connection

func (*SQSConn) ExpireNow

func (conn *SQSConn) ExpireNow()

ExpireNow forces the connection to expire

func (*SQSConn) Expired

func (conn *SQSConn) Expired() bool

Expired returns true if the connection has expired

func (*SQSConn) Send

func (conn *SQSConn) Send(msg string) error

Send sends a message

type XDGSCRAMClient

type XDGSCRAMClient struct {
	*scram.Client
	*scram.ClientConversation
	scram.HashGeneratorFcn
}

func (*XDGSCRAMClient) Begin

func (x *XDGSCRAMClient) Begin(userName, password, authzID string) (err error)

func (*XDGSCRAMClient) Done

func (x *XDGSCRAMClient) Done() bool

func (*XDGSCRAMClient) Step

func (x *XDGSCRAMClient) Step(challenge string) (response string, err error)

Jump to

Keyboard shortcuts

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