machine

package
v0.0.0-...-1b8592a Latest Latest
Warning

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

Go to latest
Published: May 30, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SSHUsername       = "ollama-machine"
	OllamaEnvFilePath = "/home/ollama-machine/env"
)

Variables

This section is empty.

Functions

func Delete

func Delete(id string) error

Delete deletes a machine by its ID.

func Save

func Save(machine *Machine) error

Save saves the given machine to a file.

Types

type Machine

type Machine struct {
	*provider.Machine
	OllamaConfig    OllamaConfig      `json:"ollamaConfig"`
	ProviderName    string            `json:"providerName"`
	CredentialsName string            `json:"credentialsName"`
	Connectivity    string            `json:"connectivity"`
	KeyPair         *ssh.KeyPairFiles `json:"keyPair"`
}

func Get

func Get(id string) (*Machine, error)

Get retrieves a machine by its ID.

func GetByName

func GetByName(name string) (*Machine, error)

GetByName retrieves a machine by its name.

func List

func List() ([]*Machine, error)

List lists all machines.

func (*Machine) SSHClient

func (m *Machine) SSHClient() (*gossh.Client, *gossh.Session, error)

SSHClient returns a new SSH client and session for the machine.

type OllamaConfig

type OllamaConfig struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

func (OllamaConfig) Address

func (o OllamaConfig) Address() string

Jump to

Keyboard shortcuts

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