github.com/Axway/agent-sdk@v1.1.101/pkg/notification/pubsub.go (about)

     1  package notification
     2  
     3  // PubSub - interface for creating a PubSub library
     4  type PubSub interface {
     5  	Publish(key, secondarykey string, data interface{}) error
     6  	PublishToTopic(data interface{}) error
     7  	PublishToTopicWithSecondaryKey(secondarykey string, data interface{}) error
     8  	PublishCacheHash(key, secondarykey string, data interface{}) error
     9  	PublishCacheHashToTopic(data interface{}) error
    10  	PublishCacheHashToTopicWithSecondaryKey(secondarykey string, data interface{}) error
    11  	Subscribe() (msgChan chan interface{}, id string)
    12  	SubscribeWithCallback(callback func(data interface{})) (id string)
    13  	Unsubscribe(id string) error
    14  }