stream

package
v0.0.0-...-795d1ad Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PublishRequest

type PublishRequest struct {
	// The json message to publish
	Message map[string]interface{} `json:"message"`
	// The topic to publish to
	Topic string `json:"topic"`
}

type PublishResponse

type PublishResponse struct {
}

type StreamService

type StreamService struct {
	// contains filtered or unexported fields
}

func NewStreamService

func NewStreamService(token string) *StreamService

func (*StreamService) Publish

func (t *StreamService) Publish(request *PublishRequest) (*PublishResponse, error)

Publish a message to the stream. Specify a topic to group messages for a specific topic.

func (*StreamService) Subscribe

func (t *StreamService) Subscribe(request *SubscribeRequest) (*SubscribeResponse, error)

Subscribe to messages for a given topic.

type SubscribeRequest

type SubscribeRequest struct {
	// The topic to subscribe to
	Topic string `json:"topic"`
}

type SubscribeResponse

type SubscribeResponse struct {
	// The next json message on the topic
	Message map[string]interface{} `json:"message"`
	// The topic subscribed to
	Topic string `json:"topic"`
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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