Documentation ¶
Index ¶
- Variables
- func NewAzServiceBusBuilder() (asbc *azServiceBusBuilder)
- func NewCloudEvent(ctx context.Context, eventType services.EventType, source, subject string, ...) (cloudevent []byte, err error)
- func NewGcpPubSubBuilder() (spb *gcpPubSubBuilder)
- type AzServiceBusClient
- func (asbc *AzServiceBusClient) Close(ctx context.Context)
- func (asbc *AzServiceBusClient) Connect(ctx context.Context, cfg *ServiceBrokerConfig) (err error)
- func (asbc *AzServiceBusClient) Consume(ctx context.Context, subscriptionId string, limit int, ...) (err error)
- func (asbc *AzServiceBusClient) DeadletterReceive(ctx context.Context) (err error)
- func (asbc *AzServiceBusClient) HandlerFn(ctx context.Context, msg *servicebus.Message) error
- func (asbc *AzServiceBusClient) Publish(ctx context.Context, eventType services.EventType, source, subject string, ...) error
- func (asbc *AzServiceBusClient) PublishRaw(ctx context.Context, cloudevent []byte) error
- type ServiceBrokerBuilderInterface
- type ServiceBrokerClient
- func (slc *ServiceBrokerClient) Add(ctx context.Context, key string, value interface{}) (err error)
- func (slc *ServiceBrokerClient) Consume(ctx context.Context, subscriptionId string, limit int, ...) (err error)
- func (slc *ServiceBrokerClient) Delete(ctx context.Context, key string) (err error)
- func (slc *ServiceBrokerClient) GetCloudeventDomain() string
- func (slc *ServiceBrokerClient) NewClient(ctx context.Context, topic string, cfg *ServiceBrokerConfig) (err error)
- func (slc *ServiceBrokerClient) PublishRaw(ctx context.Context, cloudevent []byte) (err error)
- func (slc *ServiceBrokerClient) Update(ctx context.Context, key string, value interface{}) (err error)
- type ServiceBrokerClientInterface
- type ServiceBrokerConfig
- func (sc *ServiceBrokerConfig) GetBrokerType() string
- func (sc *ServiceBrokerConfig) GetClient() ServiceBrokerClientInterface
- func (sc *ServiceBrokerConfig) HasDeadletter(b bool)
- func (sc *ServiceBrokerConfig) IsValidBrokerType() bool
- func (sc *ServiceBrokerConfig) SetBrokerType(s string)
- func (sc *ServiceBrokerConfig) SetCloudEventDomain(s string)
- func (sc *ServiceBrokerConfig) SetConnectionString(s string)
- func (sc *ServiceBrokerConfig) SetGCPProjectID(s string)
- func (sc *ServiceBrokerConfig) SetSubscription(s string)
- func (sc *ServiceBrokerConfig) SetTopic(s string)
- func (sc *ServiceBrokerConfig) Validate(ctx context.Context) (errorString string)
- type ServiceBrokerType
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceBrokerTypeList = []ServiceBrokerType{ SERVICEBROKERTYPE_UNDEFINED, SERVICEBROKERTYPE_PUBSUB, SERVICEBROKERTYPE_SERVICEBUS, }
The list that can be iterated
Functions ¶
func NewAzServiceBusBuilder ¶
func NewAzServiceBusBuilder() (asbc *azServiceBusBuilder)
func NewCloudEvent ¶
func NewGcpPubSubBuilder ¶ added in v0.1.1
func NewGcpPubSubBuilder() (spb *gcpPubSubBuilder)
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) 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 ServiceBrokerBuilderInterface ¶
type ServiceBrokerBuilderInterface interface { PrepareFoundation(ctx context.Context, defaults *configV2.BrokerDefaults, cfg *configV2.ServiceConfig) (err error) RemoveFoundation(ctx context.Context, defaults *configV2.BrokerDefaults, cfg *configV2.ServiceConfig) (err error) QueryFoundation(ctx context.Context, defaults *configV2.BrokerDefaults, cfg *configV2.ServiceConfig) (err error) Connect(ctx context.Context, cfg *configV2.ServiceConfig, topicID string) error CreateTopic(ctx context.Context, topicName string) (err error) DeleteTopic(ctx context.Context, topicName string) (err error) CreateSubscription(ctx context.Context, subID, topicName string, ackDeadline time.Duration) (err error) CreateSubscriptionWithDeadLetter(ctx context.Context, subID, topicName, DLTopicID string, ackDeadline time.Duration, maxDeliveryAttempts int) (err error) DeleteSubscription(ctx context.Context, subID string) (err error) GetTopics(ctx context.Context) ([]string, error) GetSubscriptions(ctx context.Context, subID, topicID string) ([]string, 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) 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)
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) GetClient ¶
func (sc *ServiceBrokerConfig) GetClient() ServiceBrokerClientInterface
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) SetSubscription ¶
func (sc *ServiceBrokerConfig) SetSubscription(s string)
func (*ServiceBrokerConfig) SetTopic ¶
func (sc *ServiceBrokerConfig) SetTopic(s 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 (d ServiceBrokerType) Cloud() clouds.CloudType
func (ServiceBrokerType) NewBuilder ¶
func (d ServiceBrokerType) NewBuilder() ServiceBrokerBuilderInterface
func (ServiceBrokerType) NewClient ¶
func (d ServiceBrokerType) NewClient() ServiceBrokerClientInterface
func (ServiceBrokerType) String ¶
func (d ServiceBrokerType) String() string
func (ServiceBrokerType) Type ¶
func (d ServiceBrokerType) Type() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.