Documentation
¶
Index ¶
Constants ¶
View Source
const ( HTTP = EndpointProtocol("http") // HTTP Disque = EndpointProtocol("disque") // Disque GRPC = EndpointProtocol("grpc") // GRPC Redis = EndpointProtocol("redis") // Redis Kafka = EndpointProtocol("kafka") // Kafka MQTT = EndpointProtocol("mqtt") // MQTT AMQP = EndpointProtocol("amqp") // AMQP SQS = EndpointProtocol("sqs") // SQS )
View Source
const (
AMQPExpiresAfter = time.Second * 30
)
View Source
const (
SQSExpiresAfter = time.Second * 30
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQPEndpointConn ¶
type AMQPEndpointConn struct {
// contains filtered or unexported fields
}
func (*AMQPEndpointConn) Expired ¶
func (conn *AMQPEndpointConn) Expired() bool
func (*AMQPEndpointConn) Send ¶
func (conn *AMQPEndpointConn) Send(msg string) error
type DisqueEndpointConn ¶
type DisqueEndpointConn struct {
// contains filtered or unexported fields
}
func (*DisqueEndpointConn) Expired ¶
func (conn *DisqueEndpointConn) Expired() bool
func (*DisqueEndpointConn) Send ¶
func (conn *DisqueEndpointConn) Send(msg string) error
type Endpoint ¶
type Endpoint struct { Protocol EndpointProtocol 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 QueueName string } AMQP struct { URI string SSL bool QueueName string RouteKey string } MQTT struct { Host string Port int QueueName string Qos byte Retained bool } SQS struct { QueueID string Region string CredPath string CredProfile string QueueName string } }
Endpoint represents an endpoint.
type EndpointConn ¶
type EndpointManager ¶
type EndpointManager struct {
// contains filtered or unexported fields
}
func NewEndpointManager ¶
func NewEndpointManager() *EndpointManager
func (*EndpointManager) Run ¶
func (epc *EndpointManager) Run()
Manage connection at enpoints If some connection expired we should delete it
func (*EndpointManager) Send ¶
func (epc *EndpointManager) Send(endpoint, val string) error
func (*EndpointManager) Validate ¶
func (epc *EndpointManager) Validate(url string) error
Get finds an endpoint based on its url. If the enpoint does not exist a new only is created.
type EndpointProtocol ¶
type EndpointProtocol string
EndpointProtocol is the type of protocol that the endpoint represents.
type GRPCEndpointConn ¶
type GRPCEndpointConn struct {
// contains filtered or unexported fields
}
func (*GRPCEndpointConn) Expired ¶
func (conn *GRPCEndpointConn) Expired() bool
func (*GRPCEndpointConn) Send ¶
func (conn *GRPCEndpointConn) Send(msg string) error
type HTTPEndpointConn ¶
type HTTPEndpointConn struct {
// contains filtered or unexported fields
}
func (*HTTPEndpointConn) Expired ¶
func (conn *HTTPEndpointConn) Expired() bool
func (*HTTPEndpointConn) Send ¶
func (conn *HTTPEndpointConn) Send(msg string) error
type KafkaEndpointConn ¶
type KafkaEndpointConn struct {
// contains filtered or unexported fields
}
func (*KafkaEndpointConn) Expired ¶
func (conn *KafkaEndpointConn) Expired() bool
func (*KafkaEndpointConn) Send ¶
func (conn *KafkaEndpointConn) Send(msg string) error
type MQTTEndpointConn ¶
type MQTTEndpointConn struct {
// contains filtered or unexported fields
}
func (*MQTTEndpointConn) Expired ¶
func (conn *MQTTEndpointConn) Expired() bool
func (*MQTTEndpointConn) Send ¶
func (conn *MQTTEndpointConn) Send(msg string) error
type RedisEndpointConn ¶
type RedisEndpointConn struct {
// contains filtered or unexported fields
}
func (*RedisEndpointConn) Expired ¶
func (conn *RedisEndpointConn) Expired() bool
func (*RedisEndpointConn) Send ¶
func (conn *RedisEndpointConn) Send(msg string) error
type SQSEndpointConn ¶
type SQSEndpointConn struct {
// contains filtered or unexported fields
}
func (*SQSEndpointConn) Expired ¶
func (conn *SQSEndpointConn) Expired() bool
func (*SQSEndpointConn) Send ¶
func (conn *SQSEndpointConn) Send(msg string) error
Click to show internal directories.
Click to hide internal directories.