serverflag

package
v0.0.0-...-f43cf22 Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagPrefix = clix.FlagPrefix("ECHO_SERVER_")

	Flags = clix.Flags(
		FlagListen.Flags(),
		FlagCount,
	)

	FlagListen = netflag.NewServer(FlagPrefix,
		netflag.Network("tcp", "tcp4", "tcp6", "unix"),
		netflag.Address("127.0.0.1:9900"),
		netflag.DisableGenCert,
		netflag.EnableGenCert,
	)

	FlagCount = &cli.IntFlag{
		Name:        "count",
		Aliases:     []string{"c"},
		Usage:       "number of times to repeat sending a message",
		EnvVars:     FlagPrefix.EnvVars("COUNT", "C"),
		FilePath:    FlagPrefix.FilePath("COUNT", "C"),
		Value:       1,
		Destination: new(int),
	}

	FlagSet = clix.NewFlagSet()
)

Functions

func Before

func Before(c *cli.Context) error

func Count

func Count() int

func LookupCount

func LookupCount() (int, bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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