cmd

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const PresharedKeyFlag = "grpc-preshared-key"

Variables

This section is empty.

Functions

func DeprecatedRunE added in v1.30.0

func DeprecatedRunE(fn cobrautil.CobraRunFunc, newCmd string) cobrautil.CobraRunFunc

DeprecatedRunE wraps the RunFunc with a warning log statement.

func HeadRevision added in v1.5.0

func HeadRevision(engine string) (string, error)

HeadRevision returns the latest migration revision for a given engine

func NewDatastoreCommand added in v1.16.0

func NewDatastoreCommand(programName string) (*cobra.Command, error)

func NewDevtoolsCommand added in v1.5.0

func NewDevtoolsCommand(programName string) *cobra.Command

func NewGCDatastoreCommand added in v1.16.0

func NewGCDatastoreCommand(programName string, cfg *datastore.Config) *cobra.Command

func NewHeadCommand added in v1.5.0

func NewHeadCommand(programName string) *cobra.Command

func NewLSPCommand added in v1.31.0

func NewLSPCommand(programName string, config *LSPConfig) *cobra.Command

func NewMigrateCommand added in v1.5.0

func NewMigrateCommand(programName string) *cobra.Command

func NewRepairDatastoreCommand added in v1.28.0

func NewRepairDatastoreCommand(programName string, cfg *datastore.Config) *cobra.Command

func NewRootCommand added in v1.5.0

func NewRootCommand(programName string) *cobra.Command

func NewServeCommand added in v1.5.0

func NewServeCommand(programName string, config *server.Config) *cobra.Command

func NewTestingCommand added in v1.5.0

func NewTestingCommand(programName string, config *testserver.Config) *cobra.Command

func NewVersionCommand added in v1.5.0

func NewVersionCommand(programName string) *cobra.Command

func RegisterDatastoreRootFlags added in v1.16.0

func RegisterDatastoreRootFlags(_ *cobra.Command)

func RegisterDevtoolsFlags added in v1.5.0

func RegisterDevtoolsFlags(cmd *cobra.Command)

func RegisterHeadFlags added in v1.5.0

func RegisterHeadFlags(cmd *cobra.Command)

func RegisterLSPFlags added in v1.31.0

func RegisterLSPFlags(cmd *cobra.Command, config *LSPConfig) error

func RegisterMigrateFlags added in v1.5.0

func RegisterMigrateFlags(cmd *cobra.Command)

func RegisterRootFlags added in v1.5.0

func RegisterRootFlags(cmd *cobra.Command)

func RegisterServeFlags added in v1.5.0

func RegisterServeFlags(cmd *cobra.Command, config *server.Config) error

func RegisterTestingFlags added in v1.5.0

func RegisterTestingFlags(cmd *cobra.Command, config *testserver.Config)

func RegisterVersionFlags added in v1.5.0

func RegisterVersionFlags(cmd *cobra.Command)

func SignalContextWithGracePeriod

func SignalContextWithGracePeriod(ctx context.Context, gracePeriod time.Duration) context.Context

SignalContextWithGracePeriod creates a new context that will be cancelled when an interrupt/SIGTERM signal is received and the provided grace period subsequently finishes.

Types

type LSPConfig added in v1.31.0

type LSPConfig struct {
	// Addr is the address to listen on to serve the language server protocol.
	Addr string

	Stdio bool
}

LSPConfig is the configuration for the LSP command.

func (*LSPConfig) Complete added in v1.31.0

func (c *LSPConfig) Complete(ctx context.Context) (*lsp.Server, error)

Complete adapts the LSPConfig into a usable LSP server.

Directories

Path Synopsis
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.
Code generated by github.com/ecordell/optgen.

Jump to

Keyboard shortcuts

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