pubsub

package
v0.0.0-...-0ab412c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdProjectID = "pubsub-project-id"
	CmdTopic     = "pubsub-topic"
	CmdChainID   = "pubsub-chain-id"
)

Variables

This section is empty.

Functions

func ConfigCmd

func ConfigCmd(cmd *cobra.Command)

func InitPubsub

func InitPubsub(projectID, topicID, chainID string) error

func InitPubsubFromCmd

func InitPubsubFromCmd(cmd *cobra.Command) error

func Publish

func Publish(action string, payload interface{}) error

Types

type PubsubPayload

type PubsubPayload struct {
	Event   string      `json:"event"`
	Source  string      `json:"source"`
	ChainID string      `json:"chain_id"`
	Payload interface{} `json:"payload"`
}

Jump to

Keyboard shortcuts

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