brokers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

The list that can be iterated

Functions

func NewCloudEvent

func NewCloudEvent(ctx context.Context, eventType services.EventType, source, subject string, payload []byte) (cloudevent []byte, err error)

Types

type AzServiceBusClient

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

func NewAzServiceBusClient

func NewAzServiceBusClient() (asbc *AzServiceBusClient, err error)

func (*AzServiceBusClient) Close

func (asbc *AzServiceBusClient) Close(ctx context.Context)

func (*AzServiceBusClient) Connect

func (asbc *AzServiceBusClient) Connect(ctx context.Context, cfg *ServiceBrokerConfig) (err error)

func (*AzServiceBusClient) Consume

func (asbc *AzServiceBusClient) Consume(ctx context.Context, subscriptionId string, limit int, f func(context.Context, []byte) error) (err error)

func (*AzServiceBusClient) DeadletterReceive

func (asbc *AzServiceBusClient) DeadletterReceive(ctx context.Context) (err error)

func (*AzServiceBusClient) HandlerFn

func (asbc *AzServiceBusClient) HandlerFn(ctx context.Context, msg *servicebus.Message) error

func (*AzServiceBusClient) Publish

func (asbc *AzServiceBusClient) Publish(ctx context.Context, eventType services.EventType, source, subject string, value interface{}) error

func (asbc *AzServiceBusClient) Publish(ctx context.Context, cloudevent string) (err error) {

func (*AzServiceBusClient) PublishRaw

func (asbc *AzServiceBusClient) PublishRaw(ctx context.Context, cloudevent []byte) error

type ServiceBrokerClient

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

Service implements serviceInterface

func (*ServiceBrokerClient) Add

func (slc *ServiceBrokerClient) Add(ctx context.Context, key string, value interface{}) (err error)

func (*ServiceBrokerClient) Consume

func (slc *ServiceBrokerClient) Consume(ctx context.Context, subscriptionId string, limit int, f func(context.Context, []byte) error) (err error)

func (*ServiceBrokerClient) Delete

func (slc *ServiceBrokerClient) Delete(ctx context.Context, key string) (err error)

func (*ServiceBrokerClient) GetCloudeventDomain

func (slc *ServiceBrokerClient) GetCloudeventDomain() string

func (*ServiceBrokerClient) NewClient

func (slc *ServiceBrokerClient) NewClient(ctx context.Context, topic string, cfg *ServiceBrokerConfig) (err error)

func (*ServiceBrokerClient) PublishRaw

func (slc *ServiceBrokerClient) PublishRaw(ctx context.Context, cloudevent []byte) (err error)

func (*ServiceBrokerClient) Update

func (slc *ServiceBrokerClient) Update(ctx context.Context, key string, value interface{}) (err error)

type ServiceBrokerClientInterface

type ServiceBrokerClientInterface interface {
	Connect(ctx context.Context, cfg *ServiceBrokerConfig) error
	PublishRaw(ctx context.Context, cloudevent []byte) error
	Publish(ctx context.Context, eventType services.EventType, source, subject string, value interface{}) error
	Consume(ctx context.Context, subscriptionId string, limit int, f func(context.Context, []byte) error) (err error)
}

type ServiceBrokerConfig

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

func NewServiceBrokerConfig

func NewServiceBrokerConfig(brokerType ServiceBrokerType, topic, subscription, cloudeventDomain string, hasDeadletter bool) *ServiceBrokerConfig

func (*ServiceBrokerConfig) GetBrokerType

func (sc *ServiceBrokerConfig) GetBrokerType() string

func (*ServiceBrokerConfig) GetBrokerTypeModel

func (sc *ServiceBrokerConfig) GetBrokerTypeModel() ServiceBrokerType

func (*ServiceBrokerConfig) GetClient

func (*ServiceBrokerConfig) GetCloudeventDomain

func (sc *ServiceBrokerConfig) GetCloudeventDomain() (s string)

func (*ServiceBrokerConfig) HasDeadletter

func (sc *ServiceBrokerConfig) HasDeadletter(b bool)

func (*ServiceBrokerConfig) IsValidBrokerType

func (sc *ServiceBrokerConfig) IsValidBrokerType() bool

func (*ServiceBrokerConfig) SetBrokerType

func (sc *ServiceBrokerConfig) SetBrokerType(s string)

func (*ServiceBrokerConfig) SetCloudEventDomain

func (sc *ServiceBrokerConfig) SetCloudEventDomain(s string)

func (*ServiceBrokerConfig) SetConnectionString

func (sc *ServiceBrokerConfig) SetConnectionString(s string)

func (*ServiceBrokerConfig) SetGCPProjectID

func (sc *ServiceBrokerConfig) SetGCPProjectID(s string)

func (*ServiceBrokerConfig) SetGcpCredentialsFile

func (sc *ServiceBrokerConfig) SetGcpCredentialsFile(s string)

func (*ServiceBrokerConfig) SetSubscription

func (sc *ServiceBrokerConfig) SetSubscription(s string)

func (*ServiceBrokerConfig) SetTopic

func (sc *ServiceBrokerConfig) SetTopic(s string)

func (*ServiceBrokerConfig) Validate

func (sc *ServiceBrokerConfig) Validate(ctx context.Context) (errorString string)

type ServiceBrokerType

type ServiceBrokerType int
const (
	SERVICEBROKERTYPE_UNDEFINED ServiceBrokerType = iota
	SERVICEBROKERTYPE_PUBSUB
	SERVICEBROKERTYPE_SERVICEBUS
)

func GetServiceBrokerType

func GetServiceBrokerType(serviceBrokerName string) ServiceBrokerType

func (ServiceBrokerType) Cloud

func (ServiceBrokerType) NewClient

func (ServiceBrokerType) String

func (d ServiceBrokerType) String() string

func (ServiceBrokerType) Type

func (d ServiceBrokerType) Type() string

Jump to

Keyboard shortcuts

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