algorithm

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 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

This section is empty.

Variables

This section is empty.

Functions

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
const (
	AlgoTypeBin    AlgorithType = "bin"
	AlgoTypePython AlgorithType = "python"
	AlgoTypeKey                 = "algo_type"
)

type Algorithm

type Algorithm interface {
	// Run executes the algorithm and returns the result.
	Run() ([]byte, error)

	// Add dataset to algorithm.
	AddDataset(dataset string)
}

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