Help us shape the future of Go! Take the 2026 Go Developer Survey

ssh

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseConfig

func GetBaseConfig(c framework.Container) *contract.SSHConfig

GetBaseConfig 读取database.yaml根目录结构

func NewPBSSH

func NewPBSSH(params ...interface{}) (interface{}, error)

NewPBSSH 代表实例化Client

func WithConfigPath

func WithConfigPath(configPath string) contract.SSHOption

WithConfigPath 加载配置文件地址

func WithSSHConfig

func WithSSHConfig(f func(options *contract.SSHConfig)) contract.SSHOption

WithSSHConfig 表示自行配置ssh的配置信息

Types

type PBSSH

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

PBSSH 代表PB框架的ssh实现

func (*PBSSH) GetClient

func (pb *PBSSH) GetClient(option ...contract.SSHOption) (*ssh.Client, error)

GetClient 获取Client实例

type SSHProvider

type SSHProvider struct {
}

SSHProvider 提供App的具体实现方法

func (*SSHProvider) Boot

func (pb *SSHProvider) Boot(container framework.Container) error

Boot 启动调用

func (*SSHProvider) IsDefer

func (pb *SSHProvider) IsDefer() bool

IsDefer 是否延迟初始化

func (*SSHProvider) Name

func (pb *SSHProvider) Name() string

Name 获取字符串凭证

func (*SSHProvider) Params

func (pb *SSHProvider) Params(container framework.Container) []interface{}

Params 获取初始化参数

func (*SSHProvider) Register

func (pb *SSHProvider) Register(container framework.Container) framework.NewInstance

Register 注册方法

Jump to

Keyboard shortcuts

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