client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a struct that holds the connection to the server

func NewClient

func NewClient(config Config) (*Client, error)

NewClient creates a new client with connection management and returns a pointer to it and an error

func (*Client) SendCommands

func (c *Client) SendCommands(commands []*gen.Command, auth *gen.Auth) error

SendCommands sends a list of commands to the server

func (*Client) SendProcesses

func (c *Client) SendProcesses(processes []*gen.Process, auth *gen.Auth) error

SendProcesses sends a list of processes to the server

type Config

type Config struct {
	Address          string // The server address
	SecureConnection bool   // True for secure (HTTPS), false for insecure (HTTP)
	CertFile         string // Optional path to the TLS cert file for secure connections
	Timeout          int    // Timeout in seconds for the connection
}

Config holds configuration for the client connection.

Jump to

Keyboard shortcuts

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