server

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDir added in v0.11.0

func GetConfigDir() (string, error)

func GetWorkspaceLogsDir added in v0.11.0

func GetWorkspaceLogsDir() (string, error)

func Save added in v0.11.0

func Save(c Config) error

Types

type Config added in v0.11.0

type Config struct {
	ProvidersDir                    string      `json:"providersDir"`
	RegistryUrl                     string      `json:"registryUrl"`
	Id                              string      `json:"id"`
	ServerDownloadUrl               string      `json:"serverDownloadUrl"`
	Frps                            *FRPSConfig `json:"frps,omitempty"`
	ApiPort                         uint32      `json:"apiPort"`
	HeadscalePort                   uint32      `json:"headscalePort"`
	BinariesPath                    string      `json:"binariesPath"`
	LogFilePath                     string      `json:"logFilePath"`
	DefaultProjectImage             string      `json:"defaultProjectImage"`
	DefaultProjectUser              string      `json:"defaultProjectUser"`
	DefaultProjectPostStartCommands []string    `json:"defaultProjectPostStartCommands"`

} // @name ServerConfig

func GetConfig added in v0.11.0

func GetConfig() (*Config, error)

type FRPSConfig added in v0.11.0

type FRPSConfig struct {
	Domain   string `json:"domain"`
	Port     uint32 `json:"port"`
	Protocol string `json:"protocol"`

} // @name FRPSConfig

type NetworkKey added in v0.11.0

type NetworkKey struct {
	Key string `json:"key"`

} // @name NetworkKey

type Server added in v0.11.0

type Server struct {
	TailscaleServer          TailscaleServer
	ContainerRegistryService containerregistries.IContainerRegistryService
	ProviderTargetService    providertargets.IProviderTargetService
	WorkspaceService         workspaces.IWorkspaceService
	ApiKeyService            apikeys.IApiKeyService
	GitProviderService       gitproviders.IGitProviderService
	ProviderManager          manager.IProviderManager
	// contains filtered or unexported fields
}

func GetInstance added in v0.11.0

func GetInstance(serverConfig *ServerInstanceConfig) *Server

func (*Server) GetApiUrl added in v0.11.0

func (s *Server) GetApiUrl() string

func (*Server) GetBinaryPath added in v0.11.0

func (s *Server) GetBinaryPath(binaryName, binaryVersion string) (string, error)

Check if the requested binary is already downloaded, if not, download it

func (*Server) GetLogReader added in v0.11.0

func (s *Server) GetLogReader() (io.Reader, error)

func (*Server) Start added in v0.11.0

func (s *Server) Start(errCh chan error) error

type ServerInstanceConfig added in v0.11.0

type ServerInstanceConfig struct {
	Config                   Config
	TailscaleServer          TailscaleServer
	ProviderTargetService    providertargets.IProviderTargetService
	ContainerRegistryService containerregistries.IContainerRegistryService
	WorkspaceService         workspaces.IWorkspaceService
	ApiKeyService            apikeys.IApiKeyService
	GitProviderService       gitproviders.IGitProviderService
	ProviderManager          manager.IProviderManager
}

type TailscaleServer added in v0.11.0

type TailscaleServer interface {
	Connect() error
	CreateAuthKey() (string, error)
	CreateUser() error
	HTTPClient() *http.Client
	Start() error
}

Directories

Path Synopsis
dto

Jump to

Keyboard shortcuts

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