Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CmdPublish = &subcommands.Command{ UsageLine: "publish -project [PROJECT] -topic [TOPIC] [OPTIONS]", ShortDesc: "publish a message to a topic", CommandRun: func() subcommands.CommandRun { c := &publishRun{} c.registerCommonFlags(&c.Flags) c.Flags.StringVar(&c.messageFile, "file", "", "path to file to send as message") c.Flags.Var(flag.JSONMap(&c.attributes), "attributes", "map of attributes to add to the message") return c }, }
CmdPublish describes the subcommand flags for publishing messages
View Source
var CmdSetup = &subcommands.Command{ UsageLine: "setup -project [PROJECT] -topic [TOPIC] -name [NAME]", ShortDesc: "set up a subscription", CommandRun: func() subcommands.CommandRun { c := &setupRun{} c.registerCommonFlags(&c.Flags) c.Flags.StringVar(&c.name, "name", "", "name of subscription: must be 3-255 characters, start with a letter, and composed of alphanumerics and -_.~+% only") return c }, }
CmdSetup describes the subcommand flags for setting up a subscription
View Source
var CmdSubscribe = &subcommands.Command{ UsageLine: "subscribe -project [PROJECT] -topic [TOPIC] -output [PATH/TO/OUTPUT/DIR] [OPTIONS]", ShortDesc: "subscribe to a filtered topic", CommandRun: func() subcommands.CommandRun { c := &subscribeRun{} c.registerCommonFlags(&c.Flags) c.Flags.Var(flag.JSONMap(&c.attributes), "attributes", "map of attributes to filter for") c.Flags.IntVar(&c.messageCount, "count", 1, "number of messages to read before returning") c.Flags.StringVar(&c.outputDir, "output", "", "path to directory to store output") c.Flags.StringVar(&c.subName, "sub-name", "", "name of subscription: must be 3-255 characters, start with a letter, and composed of alphanumerics and -_.~+% only") c.Flags.DurationVar(&c.timeout, "timeout", time.Hour, "timeout to stop waiting, ex. 10s, 5m, 1h30m") return c }, }
CmdSubscribe describes the subcommand flags for subscribing to messages.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.