core

package
v0.0.0-...-ead0699 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MELTCD_ACCESS_TOKEN = "access_token.txt" //nolint
View Source
const MELTCD_APPLICATIONS_FILE = "applications.json" //nolint
View Source
const MELTCD_AUTH_FILE = "auth.json" //nolint
View Source
const MELTCD_DIR = ".meltcd" //nolint
View Source
const MELTCD_LOG_FILE = "general.log" //nolint
View Source
const MELTCD_REPOSITORY_FILE = "repositories.json" //nolint

Variables

View Source
var Applications []*application.Application

Functions

func CreateLogFile

func CreateLogFile() (*os.File, error)

func Details

func Details(appName string) (application.Application, error)

func GetAccessToken

func GetAccessToken() string

func Recreate

func Recreate(appName string) error

func Refresh

func Refresh(appName string) error

func Register

func Register(app *application.Application) error

func RemoveApplication

func RemoveApplication(appName string) error

func Setup

func Setup() error

Setup will setup require settings to make use of MeltCD like setting up admin password in docker secret setting up docker volume for persistent storage

fill the Applications from the stored file

initialize a new docker client

func ShutDown

func ShutDown() error

func StoreAccessToken

func StoreAccessToken(token string) error

func StoreLog

func StoreLog(f *os.File, d *[]byte) error

func Update

func Update(app *application.Application) error

TODO: update atomic parts only specify things you need go update

Types

type AppList

type AppList struct {
	Data []AppStatus `json:"data"`
}

func List

func List() AppList

type AppStatus

type AppStatus struct {
	ID           uint32    `json:"id"`
	Name         string    `json:"name"`
	Health       string    `json:"health"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAT    time.Time `json:"updated_at"`
	LastSyncedAt time.Time `json:"last_synced_at"`
}

type LogsStreamSessions

type LogsStreamSessions struct {
	MU       sync.Mutex
	Sessions []*chan []byte
}

LogsStreamSessions

var CurrentSession LogsStreamSessions

CurrentSession Value to be used by both API and CORE

func (*LogsStreamSessions) AddSession

func (l *LogsStreamSessions) AddSession(s *chan []byte)

func (*LogsStreamSessions) RemoveSession

func (l *LogsStreamSessions) RemoveSession(s *chan []byte)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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