common

package
v0.9.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindPostgresFlags added in v0.9.0

func BindPostgresFlags(cmd *cobra.Command)

BindPostgresFlags binds flags to connect to a postgres database.

func BindRPCFlags

func BindRPCFlags(cmd *cobra.Command)

BindRPCFlags binds the RPC flags to the given command. This includes an rpcserver flag, and the TLS flags. These flags can be used to create an admin service client. The flags will be bound to all subcommands of the given command.

func DefaultKwilAdminRoot

func DefaultKwilAdminRoot() string

func DefaultKwildRoot

func DefaultKwildRoot() string

func DefaultPostgresConnConfig added in v0.9.0

func DefaultPostgresConnConfig() *pg.ConnConfig

DefaultPostgresConnConfig returns a default connection config for a postgres database.

func ExpandPath added in v0.9.0

func ExpandPath(path string) (string, error)

func GetAdminSvcClient

func GetAdminSvcClient(ctx context.Context, cmd *cobra.Command) (*adminclient.AdminClient, error)

GetAdminSvcClient will return an admin service client based on the flags. The flags should be bound using the BindRPCFlags function.

func GetPostgresFlags added in v0.9.0

func GetPostgresFlags(cmd *cobra.Command) (*pg.ConnConfig, error)

GetPostgresFlags returns the postgres flags from the given command.

func GetRPCServerFlag

func GetRPCServerFlag(cmd *cobra.Command) (string, error)

GetRPCServerFlag returns the RPC flag from the given command.

func MergePostgresFlags added in v0.9.0

func MergePostgresFlags(conf *pg.ConnConfig, cmd *cobra.Command) (*pg.ConnConfig, error)

MergePostgresFlags merges the given connection config with the flags from the given command. It only sets the fields that are set in the flags.

Types

This section is empty.

Jump to

Keyboard shortcuts

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