hosting

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LaunchOption

type LaunchOption func(server Server) error

func WithBinaryData

func WithBinaryData(path string, data []byte) LaunchOption

func WithFileUpload

func WithFileUpload(path, dest string) LaunchOption

func WithSetupScript

func WithSetupScript(script string, args ...string) LaunchOption

type Platform

type Platform interface {
	Launch(s *Server) (*Server, error)
	Server(id string) (*Server, error)
}

type Server

type Server interface {
	GetID() string
	GetIP() string
	GetName() string

	Launch(opts ...LaunchOption) error
	Destroy(ctx context.Context) error
	Alias(sub, domain string) error

	Env(string, string) error
	Exec(args ...string) (bytes.Buffer, bytes.Buffer, error)
	Copy(string, string) (bytes.Buffer, bytes.Buffer, error)
	Dump(string, []byte) (bytes.Buffer, bytes.Buffer, error)
	Connect(io.Reader, io.Writer, io.Writer, ...string) error
}

Directories

Path Synopsis
platforms

Jump to

Keyboard shortcuts

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