events

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	BROKER_TYPE_KAFKA_OAUTHBEARER        BrokerType = "KAFKA_OAUTHBEARER"
	BROKER_TYPE_KAFKA_PLAIN                         = "KAFKA_PLAIN"
	BROKER_TYPE_PUBSUB_SERVICEACCOUNT               = "PUBSUB_SERVICEACCOUNT"
	BROKER_TYPE_EVENTHUB_SHAREDACCESSKEY            = "EVENTHUB_SHAREDACCESSKEY"
	BROKER_TYPE_EVENTHUB_AADJWT                     = "EVENTHUB_AADJWT"
	BROKER_TYPE_AQMP                                = "AQMP"
	BROKER_TYPE_MQTT                                = "MQTT"
	BROKER_TYPE_COAP                                = "COAP"
	BROKER_TYPE_API_OAUTH2                          = "API_OAUTH2"
)

Variables

This section is empty.

Functions

func Install

func Install(ctx context.Context) (err error)

func Uninstall

func Uninstall(ctx context.Context) (err error)

Types

type BrokerType

type BrokerType string

type EventForwarder

type EventForwarder struct {
}

func (*EventForwarder) CallbackFn

func (ef *EventForwarder) CallbackFn(ctx context.Context, payload []byte, f ForwarderInterface) error

expects a cloudevent payload

func (*EventForwarder) New

func (ef *EventForwarder) New(ctx context.Context, f ForwarderInterface, sourceRegion, targetRegion string) (err error)

func (*EventForwarder) Run

type EventHandler

type EventHandler struct {
}

func (*EventHandler) CallbackFn

func (eh *EventHandler) CallbackFn(ctx context.Context, payload []byte, h EventHandlerInterface) error

expects a cloudevent payload

func (*EventHandler) New

func (eh *EventHandler) New(ctx context.Context, h EventHandlerInterface) (err error)

func (*EventHandler) Run

type EventHandlerInterface

type EventHandlerInterface interface {
	New(ctx context.Context, h EventHandlerInterface) error
	SetPersistenceService(p *cqrs.ServiceCQRSClient)
	GetPersistenceService() (p *cqrs.ServiceCQRSClient)
	Run(wg *sync.WaitGroup)
	GetHandlerType() HandlerTypeInterface
	CallbackFn(context.Context, []byte) (err error)
}

type ForwarderInterface

type ForwarderInterface interface {
	New(ctx context.Context, sourceRegion, targetRegion string) error
	SetSourceService(p *brokers.ServiceBrokerClient)
	SetTargetService(p *brokers.ServiceBrokerClient)
	GetSourceService() (p *brokers.ServiceBrokerClient)
	GetTargetService() (p *brokers.ServiceBrokerClient)
	Run(wg *sync.WaitGroup)
	GetType() ForwarderTypeInterface
	CallbackFn(context.Context, []byte) (err error)
}

type ForwarderType

type ForwarderType int

type ForwarderTypeInterface

type ForwarderTypeInterface interface {
	ToString() string
	Collection() collections.CollectionInterface
	Forwarder() ForwarderInterface
	Topic() string
	Subscription() string
	DeadletterTopic() string
	DeadletterSubscription() string
}

type HandlerType

type HandlerType int

type HandlerTypeInterface

type HandlerTypeInterface interface {
	ToString() string
	CollectionName() string
	Handler() EventHandlerInterface
	IsCollection() bool
	Collection() collections.CollectionInterface
	IsAggregate() bool
	Subscription() string
	Topic() string
	DeadletterSubscription() string
	DeadletterTopic() string
}

type Kafka_SASL_SSL_Oauthbearer

type Kafka_SASL_SSL_Oauthbearer struct {
	BootstrapServers              string `json:"boostrapServers"`               // bootstrap.servers=NAMESPACENAME.servicebus.windows.net:9093
	SaslLoginCallbackHandlerClass string `json:"saslLoginCallbackHandlerClass"` // sasl.login.callback.handler.class=CustomAuthenticateCallbackHandler;

}

CONNECTION_TYPE_KAFKA_OAUTHBEARER

type Kafka_SASL_SSL_Plain

type Kafka_SASL_SSL_Plain struct {
	BootstrapServers string `json:"boostrapServers"` // bootstrap.servers=NAMESPACENAME.servicebus.windows.net:9093
	Username         string `json:"username"`        // username="$ConnectionString"
	ConnectionStr    string `json:"connstr"`         // password="{YOUR.EVENTHUBS.CONNECTION.STRING}"; // SharedAccessKey

}

CONNECTION_TYPE_KAFKA_PLAIN

type PubsubServiceAccount

type PubsubServiceAccount struct {
	ProjectId         string `json:"project_id"`           // "project_id": "myprojectid"
	PrivateKeyId      string `json:"private_key_id"`       // "private_key_id": "1e6638b0d05bee9cce91d0",
	PrivateKey        string `json:"private_key"`          // "private_key": "-----BEGIN PRIVATE KEY-----\n....-----END PRIVATE KEY-----\n"
	ClientEmail       string `json:"client_email"`         // "client_email": "mypubsubaccount@myproject.iam.gserviceaccount.com",
	ClientId          string `json:"client_id"`            // "client_id": "105965600508790289979",
	ClientX509CertUrl string `json:"client_x509_cert_url"` // "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/mypubsubaccount@myproject.iam.gserviceaccount.com"

}

CONNECTION_TYPE_PUBSUB_SERVICEACCOUNT uses GOOGLE_APPLICATION_CREDENTIALS

Jump to

Keyboard shortcuts

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