thrippy

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGRPCAddress = "localhost:14460"
)

Variables

This section is empty.

Functions

func Connection

func Connection(addr string, creds credentials.TransportCredentials) (*grpc.ClientConn, error)

Connection creates a gRPC client connection to the given Thrippy server address. It supports both secure and insecure connections, based on the given credentials.

func Flags

func Flags(configFilePath altsrc.StringSourcer) []cli.Flag

Flags defines CLI flags to configure a Thrippy gRPC client. These flags can also be set using environment variables and the application's configuration file.

func LinkData

func LinkData(ctx context.Context, grpcAddr string, creds credentials.TransportCredentials, linkID string) (string, map[string]string, error)

LinkData returns the template name and saved secrets of a given Thrippy link. This function reports gRPC errors, but if the link is not found it returns nil.

func SecureCreds

func SecureCreds(cmd *cli.Command) credentials.TransportCredentials

SecureCreds initializes gRPC client credentials, using TLS or mTLS, based on CLI flags. Errors abort the application with a log message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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