Documentation
¶
Overview ¶
Package pubsub defines version 1 implementation of pubsub
Index ¶
- func New() pubsub.PubSub
- func NewPubSub(endPointURI *types.URI, resource string) pubsub.PubSub
- type API
- func (p *API) CreatePublisher(pub pubsub.PubSub) (pubsub.PubSub, error)
- func (p *API) CreateSubscription(sub pubsub.PubSub) (pubsub.PubSub, error)
- func (p *API) DeleteAllPublishers() error
- func (p *API) DeleteAllSubscriptions() error
- func (p *API) DeletePublisher(publisherID string) error
- func (p *API) DeleteSubscription(subscriptionID string) error
- func (p *API) DisableTransport()
- func (p *API) EnableTransport()
- func (p *API) GetFromPubStore(address string) (pubsub.PubSub, error)
- func (p *API) GetFromSubStore(address string) (pubsub.PubSub, error)
- func (p *API) GetPublisher(publisherID string) (pubsub.PubSub, error)
- func (p *API) GetPublishers() map[string]*pubsub.PubSub
- func (p *API) GetPublishersFromFile() ([]byte, error)
- func (p *API) GetSubscription(subscriptionID string) (pubsub.PubSub, error)
- func (p *API) GetSubscriptions() map[string]*pubsub.PubSub
- func (p *API) GetSubscriptionsFromFile() ([]byte, error)
- func (p *API) HasPublisher(address string) (pubsub.PubSub, bool)
- func (p *API) HasSubscription(address string) (pubsub.PubSub, bool)
- func (p *API) HasTransportEnabled() bool
- func (p *API) ReloadStore()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API ... api methods for publisher subscriber
func GetAPIInstance ¶
GetAPIInstance get event instance
func (*API) CreatePublisher ¶
CreatePublisher create a publisher data and store it a file and cache
func (*API) CreateSubscription ¶
CreateSubscription create a subscription and store it in a file and cache
func (*API) DeleteAllPublishers ¶
DeleteAllPublishers delete all the publisher information the store and cache.
func (*API) DeleteAllSubscriptions ¶
DeleteAllSubscriptions delete all subscription information
func (*API) DeletePublisher ¶
DeletePublisher delete a publisher by id
func (*API) DeleteSubscription ¶
DeleteSubscription delete a subscription by id
func (*API) DisableTransport ¶
func (p *API) DisableTransport()
DisableTransport disables usage of amqp
func (*API) GetFromPubStore ¶
GetFromPubStore get data from publisher store
func (*API) GetFromSubStore ¶
GetFromSubStore get data from subscription store
func (*API) GetPublisher ¶
GetPublisher get a publisher by it's id
func (*API) GetPublishers ¶
GetPublishers get all publishers information
func (*API) GetPublishersFromFile ¶
GetPublishersFromFile get publisher data from the file store
func (*API) GetSubscription ¶
GetSubscription get a subscription by it's id
func (*API) GetSubscriptions ¶
GetSubscriptions get all subscription inforamtions
func (*API) GetSubscriptionsFromFile ¶
GetSubscriptionsFromFile get subscriptions data from the file store
func (*API) HasPublisher ¶
HasPublisher check if the publisher is already exists in the store/cache
func (*API) HasSubscription ¶
HasSubscription check if the subscription is already exists in the store/cache
func (*API) HasTransportEnabled ¶
HasTransportEnabled flag to indicate if amqp is enabled
func (*API) ReloadStore ¶
func (p *API) ReloadStore()
ReloadStore reload store if there is any change or refresh is required