Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DaggerEngine ¶
type DaggerEngine struct {
// contains filtered or unexported fields
}
DaggerEngine is a struct that implements the Engine interface.
It contains a logger.Log instance and a dagger.Client instance. The logger.Log instance is used for logging, and the dagger.Client instance is used for interacting with the Dagger engine.
The Start method is used to start the Dagger engine and returns a pointer to a dagger.Client instance.
func (*DaggerEngine) GetEngine ¶
func (d *DaggerEngine) GetEngine() *dagger.Client
GetEngine returns the Dagger engine instance.
Returns:
- A pointer to a dagger.Client instance.
Example:
engine := enginex.New() client, err := engine.Start(context.Background()) if err != nil { // handle error } engine.GetEngine() // Returns a pointer to a dagger.Client instance
func (*DaggerEngine) Start ¶
func (d *DaggerEngine) Start(ctx context.Context, options ...dagger.ClientOpt) (*dagger. Client, error)
Start starts the Dagger engine and returns a pointer to a dagger.Client instance. It takes a context and a list of options as input.
Parameters:
- ctx: A context to use for the operation.
- options: A list of options to pass to the Dagger engine.
Returns:
- A pointer to a dagger.Client instance.
type Engine ¶
type Engine interface { Start(ctx context.Context, options ...dagger.ClientOpt) (*dagger.Client, error) GetEngine() *dagger.Client }
Engine is an interface that represents a Dagger engine. It provides methods for starting the engine and getting the engine instance.
The Start method is used to start the engine and returns a pointer to a dagger.Client instance. The GetEngine method is used to get the engine instance.