storage

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AkkerisAppLabelKey = "akkeris.io/app-name"
View Source
const AkkerisDynoTypeLabelKey = "akkeris.io/dyno-type"
View Source
const DrainAnnotationKey = "logtrain.akkeris.io/drains"
View Source
const HostnameAnnotationKey = "logtrain.akkeris.io/hostname"
View Source
const TagAnnotationKey = "logtrain.akkeris.io/tag"

Variables

This section is empty.

Functions

func GetHostNameFromTLO

func GetHostNameFromTLO(kube kubernetes.Interface, obj meta.Object, useAkkerisHosts bool) string

Types

type DataSource

type DataSource interface {
	AddRoute() chan LogRoute
	RemoveRoute() chan LogRoute
	GetAllRoutes() ([]LogRoute, error)
}

type KubernetesDataSource

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

func CreateKubernetesDataSource

func CreateKubernetesDataSource(kube kubernetes.Interface) (*KubernetesDataSource, error)

func (*KubernetesDataSource) AddRoute

func (kds *KubernetesDataSource) AddRoute() chan LogRoute

func (*KubernetesDataSource) Close

func (kds *KubernetesDataSource) Close() error

func (*KubernetesDataSource) GetAllRoutes

func (kds *KubernetesDataSource) GetAllRoutes() ([]LogRoute, error)

func (*KubernetesDataSource) RemoveRoute

func (kds *KubernetesDataSource) RemoveRoute() chan LogRoute

type Listener

type Listener interface {
	Close() error
	Listen(string) error
	NotificationChannel() <-chan *pq.Notification
	Ping() error
}

This normally isnt needed but in order to pass in a fake listener for testing we need this.

type LogRoute

type LogRoute struct {
	Endpoint string
	Hostname string
	Tag      string
	// contains filtered or unexported fields
}

type PostgresDataSource

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

func CreatePostgresDataSource

func CreatePostgresDataSource(db *sql.DB, listener Listener, init bool) (*PostgresDataSource, error)

func (*PostgresDataSource) AddRoute

func (pds *PostgresDataSource) AddRoute() chan LogRoute

func (*PostgresDataSource) GetAllRoutes

func (pds *PostgresDataSource) GetAllRoutes() ([]LogRoute, error)

func (*PostgresDataSource) RemoveRoute

func (pds *PostgresDataSource) RemoveRoute() chan LogRoute

Jump to

Keyboard shortcuts

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