agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Proxy = &cli.App{
	Name:    "statefun-proxy",
	Usage:   "Flink's Stateful Functions Proxy",
	Version: "v0.0.1",
	Flags: []cli.Flag{
		&cli.StringSliceFlag{
			Name:    "broker",
			Usage:   "Kafka broker URLs",
			Value:   cli.NewStringSlice("0.0.0.0:19092"),
			EnvVars: []string{"KAFKA_BROKER"},
		},
		&cli.StringFlag{
			Name:    "listen",
			Aliases: []string{"l"},
			Usage:   "Address to listen on",
			Value:   ":8801",
			EnvVars: []string{"STATEFUN_PROXY_ADDR"},
		},
		&cli.BoolFlag{
			Name:    "debug",
			Aliases: []string{"d"},
			Usage:   "Debug log level",
			Value:   false,
			EnvVars: []string{"STATEFUN_PROXY_DEBUG"},
		},
	},
	Action: func(ctx *cli.Context) (err error) {
		p, err := proxy.New(proxy.WithAddr(ctx.String("listen")))
		if err != nil {
			return
		}
		if ctx.Bool("debug") {
			if err = p.Configure(proxy.WithDebug()); err != nil {
				return
			}
		}
		return p.Run(ctx.Context)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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