eventapi

package
v0.3.20 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobsetMapper

type JobsetMapper interface {
	// Get returns the int64 mapping, or an error if no mapping can be determined
	Get(ctx context.Context, queue string, jobset string) (int64, error)
}

JobsetMapper Allows us to map between external jobset identifiers (i.e (queue, jobset)) and our internal int64 representation

type PostgresJobsetMapper

type PostgresJobsetMapper struct {
	// contains filtered or unexported fields
}

PostgresJobsetMapper uses Postgres to store mappings. New Mappings will be created automatically and stored in a local LRU cache for fast access

func NewJobsetMapper

func NewJobsetMapper(eventDb *eventdb.EventDb, cachesize int, initialiseSince time.Duration) (*PostgresJobsetMapper, error)

func (*PostgresJobsetMapper) Get

func (j *PostgresJobsetMapper) Get(ctx context.Context, queue string, jobset string) (int64, error)

type StaticJobsetMapper

type StaticJobsetMapper struct {
	JobsetIds map[string]int64
}

StaticJobsetMapper has a set of jobsets backed by a simple map. It's mainly intended for test purposes

func (*StaticJobsetMapper) Get

func (j *StaticJobsetMapper) Get(ctx context.Context, queue string, jobset string) (int64, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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