client

package
v0.0.0-...-57f2219 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: LGPL-2.1 Imports: 8 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: LGPL-2.1-or-later

SPDX-License-Identifier: LGPL-2.1-or-later

SPDX-License-Identifier: LGPL-2.1-or-later

Index

Constants

View Source
const (
	BlueChiControllerConfdDirectory = "/etc/bluechi/controller.conf.d/"
	BlueChiAgentConfdDirectory      = "/etc/bluechi/agent.conf.d/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlueChiAgentConfig

type BlueChiAgentConfig struct {
	NodeName          *string
	ManagerHost       *string
	ManagerPort       *int64
	ManagerAddress    *string
	HeartbeatInterval *int64
	LogLevel          *string
	LogTarget         *string
	LogIsQuiet        *bool
}

func (BlueChiAgentConfig) Serialize

func (cfg BlueChiAgentConfig) Serialize() string

type BlueChiControllerConfig

type BlueChiControllerConfig struct {
	AllowedNodeNames []string
	ManagerPort      *int64
	LogLevel         *string
	LogTarget        *string
	LogIsQuiet       *bool
}

func (BlueChiControllerConfig) Serialize

func (cfg BlueChiControllerConfig) Serialize() string

type Client

type Client interface {
	Connect() error
	Disconnect() error

	InstallBlueChi(bool, bool) error

	CreateControllerConfig(string, BlueChiControllerConfig) error
	RemoveControllerConfig(string) error
	RestartBlueChiController() error
	StopBlueChiController() error

	CreateAgentConfig(string, BlueChiAgentConfig) error
	RemoveAgentConfig(string) error
	RestartBlueChiAgent() error
	StopBlueChiAgent() error
}

func NewSSHClient

func NewSSHClient(host string, user string, password string, pkPath string, insecureIgnoreHostKey bool) Client

type SSHClient

type SSHClient struct {
	Host                  string
	User                  string
	Password              string
	PKPath                string
	InsecureIgnoreHostKey bool
	// contains filtered or unexported fields
}

func (*SSHClient) Connect

func (c *SSHClient) Connect() error

func (*SSHClient) CreateAgentConfig

func (c *SSHClient) CreateAgentConfig(file string, cfg BlueChiAgentConfig) error

func (*SSHClient) CreateControllerConfig

func (c *SSHClient) CreateControllerConfig(file string, cfg BlueChiControllerConfig) error

func (*SSHClient) Disconnect

func (c *SSHClient) Disconnect() error

func (*SSHClient) InstallBlueChi

func (c *SSHClient) InstallBlueChi(installCtrl bool, installAgent bool) error

func (*SSHClient) RemoveAgentConfig

func (c *SSHClient) RemoveAgentConfig(file string) error

func (*SSHClient) RemoveControllerConfig

func (c *SSHClient) RemoveControllerConfig(file string) error

func (*SSHClient) RestartBlueChiAgent

func (c *SSHClient) RestartBlueChiAgent() error

func (*SSHClient) RestartBlueChiController

func (c *SSHClient) RestartBlueChiController() error

func (*SSHClient) StopBlueChiAgent

func (c *SSHClient) StopBlueChiAgent() error

func (*SSHClient) StopBlueChiController

func (c *SSHClient) StopBlueChiController() error

Jump to

Keyboard shortcuts

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