algorithm

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	AlgoTypeBin    AlgorithType = "bin"
	AlgoTypePython AlgorithType = "python"
	AlgoTypeWasm   AlgorithType = "wasm"
	AlgoTypeDocker AlgorithType = "docker"
	AlgoTypeKey                 = "algo_type"
	AlgoArgsKey                 = "algo_args"

	ResultsDir     = "results"
	DatasetsDir    = "datasets"
	AlgoWorkingDir = "/cocos"
)

Variables

This section is empty.

Functions

func AlgorithmArgsFromContext added in v0.3.0

func AlgorithmArgsFromContext(ctx context.Context) []string

func AlgorithmArgsToContext added in v0.3.0

func AlgorithmArgsToContext(ctx context.Context, algoArgs []string) context.Context

func AlgorithmTypeFromContext

func AlgorithmTypeFromContext(ctx context.Context) string

func AlgorithmTypeToContext

func AlgorithmTypeToContext(ctx context.Context, algoType string) context.Context

Types

type AlgorithType

type AlgorithType string

type Algorithm

type Algorithm interface {
	// Run executes the algorithm and returns the result.
	Run() error
}

Algorithm is an interface that specifies the API for an algorithm.

type Stderr

type Stderr struct {
	Logger   *slog.Logger
	EventSvc events.Service
}

func (*Stderr) Write

func (s *Stderr) Write(p []byte) (n int, err error)

Write implements io.Writer.

type Stdout

type Stdout struct {
	Logger *slog.Logger
}

func (*Stdout) Write

func (s *Stdout) Write(p []byte) (n int, err error)

Write implements io.Writer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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