cache

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = &cli.Command{
	Name:  "cache",
	Usage: "Run a local server to host a remote cache for bazel",
	Flags: []cli.Flag{
		cli.BoolFlag{
			Name:  "bazel_flag",
			Usage: "print flag for bazel",
		},
	},
	Action: func(c *cli.Context) error {
		if c.Bool("bazel_flag") {
			fmt.Printf("--remote_http_cache=http://%s:%d%s", bcache.Default.Address, bcache.Default.Port, bcache.Default.PathPrefix)
			return nil
		}
		err := bcache.Default.Serve()
		if err != nil {
			return cli.NewExitError(fmt.Sprintf("cache server failed: %v", err), 1)
		}
		return nil
	},
}

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