util

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAdminSocketPath = common.DefaultAdminSocketPath

Variables

This section is empty.

Functions

func NewGRPCClient

func NewGRPCClient(addr string) (*grpc.ClientConn, error)

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func AdaptCommand

func AdaptCommand(env *common_cli.Env, cmd Command) *Adapter

AdaptCommand converts a command into one conforming to the Command interface from github.com/mitchellh/cli

func (*Adapter) Help

func (a *Adapter) Help() string

func (*Adapter) Run

func (a *Adapter) Run(args []string) int

func (*Adapter) Synopsis

func (a *Adapter) Synopsis() string

type AgentClient

type AgentClient interface {
	Release()
	NewLoggerClient() loggerv1.LoggerClient
}

func NewAgentClient

func NewAgentClient(addr string) (AgentClient, error)

type Command

type Command interface {
	Name() string
	Synopsis() string
	AppendFlags(*flag.FlagSet)
	Run(context.Context, *common_cli.Env, AgentClient) error
}

Command is a common interface for commands in this package. The adapter adapts this interface to the Command interface from github.com/mitchellh/cli.

Jump to

Keyboard shortcuts

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