composer

package module
v0.0.0-...-b82b390 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

README

Composer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllocUpdater

type AllocUpdater interface {
}

type BoltdbStore

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

func NewBoltdbStore

func NewBoltdbStore(path string) (*BoltdbStore, error)

func NewBoltdbStoreWithDB

func NewBoltdbStoreWithDB(db *bolt.DB) (*BoltdbStore, error)

func (*BoltdbStore) GetProjects

func (s *BoltdbStore) GetProjects() ([]*proto.Project, error)

func (*BoltdbStore) GetTaskState

func (s *BoltdbStore) GetTaskState(allocID, taskName string) (*proto.ServiceState, *proto.ServiceState_Handle, error)

func (*BoltdbStore) GetTasks

func (s *BoltdbStore) GetTasks(allocID string) ([]string, error)

func (*BoltdbStore) PutProject

func (s *BoltdbStore) PutProject(a *proto.Project) error

func (*BoltdbStore) PutTaskHandle

func (s *BoltdbStore) PutTaskHandle(allocID string, taskName string, handle *proto.ServiceState_Handle) error

func (*BoltdbStore) PutTaskState

func (s *BoltdbStore) PutTaskState(allocID string, taskName string, state *proto.ServiceState) error

type Config

type Config struct {
	DbPath   string
	Notifier Notifier
	Hooks    []hooks.ServiceHookFactory
}

func DefaultConfig

func DefaultConfig() *Config

type Notifier

type Notifier interface {
	Notify(event *proto.Event)
}

type Option

type Option func(*Config)

func WithHooks

func WithHooks(h ...hooks.ServiceHookFactory) Option

func WithNotifier

func WithNotifier(n Notifier) Option

type ProjectRunner

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

func (*ProjectRunner) Restore

func (p *ProjectRunner) Restore() error

func (*ProjectRunner) Status

func (r *ProjectRunner) Status() *Status

func (*ProjectRunner) UpdateProject

func (r *ProjectRunner) UpdateProject(p *proto.Project)

type Server

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

func NewServer

func NewServer(configOpts ...Option) (*Server, error)

func (*Server) GetProjectStatus

func (r *Server) GetProjectStatus(name string) (*Status, error)

func (*Server) Up

func (r *Server) Up(ctx context.Context, req *proto.Project) (*proto.Project_Ref, error)

type Status

type Status struct {
	Complete bool
	State    map[string]*proto.ServiceState
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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