enginex

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

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.

func New

func New() Engine

New returns a new DaggerEngine instance.

Parameters:

  • l: A logger instance to use for logging.

Returns:

  • A new DaggerEngine instance.

Jump to

Keyboard shortcuts

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