Documentation
¶
Index ¶
- func BuildUnit(...) string
- func Copy(ctx context.Context, dst io.Writer, src io.Reader) (int, error)
- func Deploy(log *slog.Logger, ctx context.Context, cfg DeployConfig) error
- func ExtractTarGzStrip(src, dest string) error
- func New(ctx context.Context, out notifier.Topic, deps *Dependencies, host *entity.Host) *integration
- func NewNotifierLogger(topic notifier.Topic) slog.Handler
- func RandomPort() uint16
- func ServiceFileExists(ctx context.Context, conn *dbus.Conn, name string) (bool, error)
- type DAG
- type Dependencies
- type DeployConfig
- type HostConfig
- type HostDeploymentJobState
- type Job
- type LocalClickhouseConfig
- type Log
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildUnit ¶
func BuildUnit(namespace, service, description, executablePath, envPath, secretPath, raftPath string) string
GPTMAXXING
func ExtractTarGzStrip ¶
func NewNotifierLogger ¶
Logger with up-to-date state information todo: optimize / or use another library; to store the log in memory (not render immedaitely)
func RandomPort ¶
func RandomPort() uint16
Types ¶
type Dependencies ¶
type Dependencies struct {
HostConfig HostConfig
// host specific configuration
HostConfigUsecase *mycontent_base.Handler[*entity.Host]
// service configuration (to be installed on the host)
ServiceDefinitionUsecase *mycontent_base.Handler[*entity.ServiceDefinition]
// archive / artifact repository storing build & archive information
RepositoryUsecase *mycontent_base.Handler[*entity.Repository]
// store service's env
EnvUsecase *mycontent_base.Handler[*entity.Env]
// store service's secret
SecretUsecase *mycontent_base.Handler[*entity.Secret]
RoutingUsecase *mycontent_base.Handler[*entity.Routing]
BuildUsecase *mycontent_base.Handler[*entity.BuildArtifact]
JobUsecase *mycontent_base.Handler[*entity.DeploymentJob]
// attachment
BuildArtifactUsecase *mycontent_base.HandlerWithAttachment
// deploy job client
RaftJobUsecase *deployjob.Client
}
Dependencies in the integration side (not inside raft)
type DeployConfig ¶
type HostConfig ¶
type HostConfig struct {
LocalClickhouseConfig LocalClickhouseConfig `json:"local_clickhouse_config"`
}
type HostDeploymentJobState ¶
type HostDeploymentJobState struct {
ConfigurationStatus entity.HostConfigurationStatus `json:"configuration_status"`
RestartServiceStatus entity.HostRestartServiceStatus `json:"restart_service_status"`
}
Local host state
type Job ¶
type Job interface {
GetName() string
GetRetryCount() uint8
GetStatus() Status
GetDAG() DAG
GetCurrentSteps() uint8
GetTotalSteps() uint8
GetURL() string
Execute() error // intentional no return value; it should be a side effect that represented by JobStatus
}
Trying to make job generic Not specific to this usecase, TODO: move to common library All prefixed with Get.. to make it easy for each implementation expose their state with the name without prefix
type LocalClickhouseConfig ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.