Documentation ¶
Index ¶
Constants ¶
View Source
const (
// ClientType is the client type to be specified in the "pubsub" HTTP header.
ClientType = "publisher"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher represents a pubsub publisher.
func New ¶
func New(ctx context.Context, u *url.URL, options ...clients.Options) (publisher *Publisher, resp *http.Response, err error)
New creates a new Publisher. The given ctx is used to close the goroutines launched from this function call.
func (*Publisher) Close ¶
Close cancels the publisher's context, ends its goroutines, and websocket.
func (*Publisher) Done ¶
func (p *Publisher) Done() (done <-chan struct{})
Done mimics context.Context's Done method.
Click to show internal directories.
Click to hide internal directories.