tools

package
v0.0.0-...-26e315e Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogCloser

func LogCloser(ctx context.Context, closer io.Closer)

func LoggerFromContext

func LoggerFromContext(ctx context.Context) *zap.Logger

func LoggerToContext

func LoggerToContext(ctx context.Context, logger *zap.Logger) context.Context

func NamedLoggerToContext

func NamedLoggerToContext(ctx context.Context, name string) context.Context

NamedLoggerToContext put an attribute called name where the value is the same from the argument. This is kinda a work around as logger name it not printed when used in `console` mode.

func NewLogger

func NewLogger() *zap.Logger

Types

type SSHClient

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

func NewSSHClient

func NewSSHClient(cfg config.ServerConfig) (*SSHClient, error)

func (*SSHClient) Close

func (c *SSHClient) Close() error

func (*SSHClient) Exec

func (c *SSHClient) Exec(ctx context.Context, cmd string) (string, error)

func (*SSHClient) UploadDir

func (c *SSHClient) UploadDir(ctx context.Context, dir fs.FS, root string) error

Jump to

Keyboard shortcuts

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