types

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package types is a container of all of the domain types and interfaces that are used across multiple packages within the service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DigesterProvider

type DigesterProvider func(start, stop time.Time) vpcflow.Digester

DigesterProvider takes a start and a stop time, and returns a digester bound by those times

type ErrInProgress

type ErrInProgress struct {
	Key string
}

ErrInProgress indicates that a digest is in the process of being created

func (ErrInProgress) Error

func (e ErrInProgress) Error() string

type ErrNotFound

type ErrNotFound struct {
	ID string
}

ErrNotFound represents a resource lookup that failed due to a missing record.

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

type LogFn added in v0.2.0

type LogFn = runhttp.LogFn

LogFn is the recommended way to extract a logger from the context.

var LoggerFromContext LogFn = runhttp.LoggerFromContext

LoggerFromContext is a concrete implementation of the LogFn interface.

type Logger added in v0.2.0

type Logger = runhttp.Logger

Logger is the project logger interface.

type Marker

type Marker interface {
	// Mark flags the digest identified by key as being "in progress"
	Mark(ctx context.Context, key string) error

	// Unmark flags the digest identified by key as not being "in progress"
	Unmark(ctx context.Context, key string) error
}

Marker is an interface for indicating that a digest is in progress of being created

type Queuer

type Queuer interface {
	Queue(ctx context.Context, id string, start, stop time.Time) error
}

Queuer provides an interface for queuing digest jobs onto a streaming appliance

type Stat added in v0.2.0

type Stat = runhttp.Stat

Stat is the project metrics client interface.

type StatFn added in v0.2.0

type StatFn = runhttp.StatFn

StatFn is the recommended way to extract a metrics client from the context.

var StatFromContext StatFn = runhttp.StatFromContext

StatFromContext is a concrete implementation of the StatFn interface.

type Storage

type Storage interface {
	// Get returns the digest for the given key.
	Get(ctx context.Context, key string) (io.ReadCloser, error)

	// Exists returns true if the digest exists, but does not download the digest body.
	Exists(ctx context.Context, key string) (bool, error)

	// Store stores the digest
	Store(ctx context.Context, key string, data io.ReadCloser) error
}

Storage is an interface for accessing created digests. It is the caller's responsibility to call Close on the Reader when done.

Jump to

Keyboard shortcuts

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