cmd

package
v0.0.0-...-1a22241 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "plugin-pub-csv",
	Short: "A publisher that pulls data from a CSV file.",
	Long: fmt.Sprintf(`Version %s
Runs the publisher in externally controlled mode.`, version.Version.String()),
	Run: func(cmd *cobra.Command, args []string) {

		log.Print("Starting CSV Publisher Plugin.")
		plugin.Serve(&plugin.ServeConfig{
			HandshakeConfig: plugin.HandshakeConfig{
				ProtocolVersion:  plugins.PublisherProtocolVersion,
				MagicCookieKey:   plugins.PublisherMagicCookieKey,
				MagicCookieValue: plugins.PublisherMagicCookieValue,
			},
			Plugins: map[string]plugin.Plugin{
				"publisher": pub.NewServerPlugin(internal.NewServer(
					hclog.New(&hclog.LoggerOptions{
						Level:      hclog.Trace,
						Output:     os.Stderr,
						JSONFormat: true,
					}))),
			},

			GRPCServer: plugin.DefaultGRPCServer,
		})
	}}

RootCmd represents the base command when called without any subcommands

Functions

func Execute

func Execute()

Types

This section is empty.

Jump to

Keyboard shortcuts

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