Documentation
¶
Index ¶
- type PubSubClient
- func (qcli *PubSubClient) DeleteTopic()
- func (qcli *PubSubClient) Disconnect()
- func (qcli *PubSubClient) Exists() bool
- func (qcli *PubSubClient) GetAll() []pb.DeployStatusMessage
- func (qcli *PubSubClient) GetMessage(fn messageHandler)
- func (qcli *PubSubClient) GetMsgIDMessages(msgid string) pb.DeployStatusMessage
- func (qcli *PubSubClient) List()
- func (qcli *PubSubClient) NewClient()
- func (qcli *PubSubClient) Publish(alert *pb.DeployMessage) (string, error)
- func (qcli *PubSubClient) PublishResponse(deploystatus *pb.DeployStatusMessage) (string, error)
- func (qcli *PubSubClient) SetTopic() error
- func (qcli *PubSubClient) Stop()
- func (qcli *PubSubClient) Subscribe() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSubClient ¶
type PubSubClient struct { TopicName string SubName string ProjectID string Cancel context.CancelFunc CTX context.Context MyTopic *pubsub.Topic MySub *pubsub.Subscription // contains filtered or unexported fields }
PubSubClient holds queue related stuff
func (*PubSubClient) DeleteTopic ¶
func (qcli *PubSubClient) DeleteTopic()
DeleteTopic get rid of topic
func (*PubSubClient) Disconnect ¶
func (qcli *PubSubClient) Disconnect()
Disconnect delete subscription
func (*PubSubClient) Exists ¶
func (qcli *PubSubClient) Exists() bool
Exists - returns true if topic exists
func (*PubSubClient) GetAll ¶
func (qcli *PubSubClient) GetAll() []pb.DeployStatusMessage
GetAll - get messages but filter them
func (*PubSubClient) GetMessage ¶
func (qcli *PubSubClient) GetMessage(fn messageHandler)
GetMessage - get messages blocking
func (*PubSubClient) GetMsgIDMessages ¶
func (qcli *PubSubClient) GetMsgIDMessages(msgid string) pb.DeployStatusMessage
GetMsgIDMessages - get messages but filter them
func (*PubSubClient) NewClient ¶
func (qcli *PubSubClient) NewClient()
NewClient - connect the client
func (*PubSubClient) Publish ¶
func (qcli *PubSubClient) Publish(alert *pb.DeployMessage) (string, error)
Publish - add some something
func (*PubSubClient) PublishResponse ¶
func (qcli *PubSubClient) PublishResponse(deploystatus *pb.DeployStatusMessage) (string, error)
PublishResponse - add some something
func (*PubSubClient) SetTopic ¶
func (qcli *PubSubClient) SetTopic() error
SetTopic - set or create a topic if not exists
func (*PubSubClient) Subscribe ¶
func (qcli *PubSubClient) Subscribe() error
Subscribe - do that to a topic
Click to show internal directories.
Click to hide internal directories.