pubsubclient

package
v0.0.0-...-e90f3c6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

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) List

func (qcli *PubSubClient) List()

List - idk ... things

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) Stop

func (qcli *PubSubClient) Stop()

Stop - close topic/flush messages

func (*PubSubClient) Subscribe

func (qcli *PubSubClient) Subscribe() error

Subscribe - do that to a topic

Jump to

Keyboard shortcuts

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