engine

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: GPL-3.0 Imports: 17 Imported by: 4

README

logo

Aline Engine

Discord Telegram Twitter

This project is a workflow engine similar to GitHub Actions, designed for automating the deployment, testing, verification, monitoring, and other functionalities of on-chain contracts.

The engine is divided into worker nodes and master nodes, using gRPC for communication.

Worker Nodes

func NewWorkerEngine(masterAddress string) (Engine, error) {}

Master Nodes

func NewMasterEngine(listenPort int) (Engine, error) {}

Usage Example

This project primarily serves the hamster-develop project. You can refer to the usage in that project for more information.

Documentation

Documentation

About Hamster

Hamster is aiming to build the one-stop infrastructure developer toolkits for Web3.0. It defines itself as a development, operation and maintenance DevOps service platform, providing a set of development tools as well as O&M tools, empowering projects in Web3.0 to improve their coding and delivery speed, quality and efficiency, as well as product reliability & safety.

With Hamster, developers or project teams realize the development, verification and O&M stages of their blockchain projects in an automatic, standardized and tooled approach: from contract template of multiple chains, contract/frontend code build, security check, contract deployment to the contract operation and maintenance.

Together with its developer toolkits, Hamster offers the RPC service and decentralized computing power network service when users choose to deploy their contracts via Hamster.

At the same time, the contract security check part within the developer toolkits is offered separately to its to-C customers, who could check their contracts to avoid potential security risks.

Contributors

This project exists thanks to all the people who contribute.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	CreateJob(name string, yaml string) error
	SaveJobParams(name string, params map[string]string) error
	SaveJobUserId(name string, userId string) error
	DeleteJob(name string) error
	UpdateJob(name, newName, jobYaml string) error
	GetJob(name string) (*model.Job, error)
	GetJobs(keyword string, page, size int) (*model.JobPage, error)
	GetCodeInfo(name string, historyId int) (string, error)
	ExecuteJob(name string, id int) (*model.JobDetail, error)
	ReExecuteJob(name string, id int) error
	GetJobHistory(name string, id int) (*model.JobDetail, error)
	GetJobHistorys(name string, page, size int) (*model.JobDetailPage, error)
	DeleteJobHistory(name string, id int) error
	CreateJobDetail(name string, id int) (*model.JobDetail, error)
	ExecuteJobDetail(name string, id int) error
	RegisterStatusChangeHook(hook func(message model.StatusChangeMessage))
	GetJobHistoryLog(name string, id int) (*model.JobLog, error)
	GetJobHistoryStageLog(name string, id int, stageName string, start int) (*model.JobStageLog, error)
	GetJobHistoryStepLog(name string, id int, stageName string, stepName string) (*output.Step, error)
	TerminalJob(name string, id int) error
	GetCurrentJobStatus(jobName string, jobID int) (model.Status, error)
	IsValidWorker(w string) bool
	GetWorkRootPath() string
}

func NewMasterEngine added in v1.0.3

func NewMasterEngine(listenPort int) (Engine, error)

func NewWorkerEngine added in v1.0.3

func NewWorkerEngine(masterAddress string) (Engine, error)

type Role added in v1.0.3

type Role int
const (
	RoleMaster Role = iota
	RoleWorker
)

Directories

Path Synopsis
bin
grpc
api
logger 提供封装好的 logrus 日志库 日志等级从底到高分别为:trace, debug, info, warn, error, fatal, panic trace 用于跟踪程序运行过程中的一些细节 debug 用于调试程序 info 用于重要信息 warn 用于警告信息 error 用于错误信息 fatal 用于致命错误,程序将退出 panic 用于致命错误,程序将崩溃退出,并展开堆栈调用信息
logger 提供封装好的 logrus 日志库 日志等级从底到高分别为:trace, debug, info, warn, error, fatal, panic trace 用于跟踪程序运行过程中的一些细节 debug 用于调试程序 info 用于重要信息 warn 用于警告信息 error 用于错误信息 fatal 用于致命错误,程序将退出 panic 用于致命错误,程序将崩溃退出,并展开堆栈调用信息

Jump to

Keyboard shortcuts

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