svcdetector

package
v0.0.0-...-e2200ed Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package svcdetector orchestrates kubernetes integration

Index

Constants

View Source
const (
	// AppStateChangeAdded represents an app being added
	AppStateChangeAdded string = "added"
	// AppStateChangeWithdrawn represents an app being withdrawn
	AppStateChangeWithdrawn string = "withdrawn"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppStateChange

type AppStateChange struct {
	App   peers.App
	State string
}

AppStateChange is a struct that represents a change in the app state

type AppStateManager

type AppStateManager interface {
	Changes() chan AppStateChange
}

AppStateManager is an interface for managing the state of apps

func NewDirectoryMonitoringAppStateManager

func NewDirectoryMonitoringAppStateManager(location string, fs afero.Fs) AppStateManager

NewDirectoryMonitoringAppStateManager is used for integration testing

func NewK8sAppStateManager

func NewK8sAppStateManager(
	svcRepository ServiceRepository,
	cleanupInterval time.Duration,
) AppStateManager

NewK8sAppStateManager create AppStateManager instances, that expose kubernetes services (or not, judging on their annotations)

type ServiceRepository

type ServiceRepository interface {
	// contains filtered or unexported methods
}

ServiceRepository allows quering k8s server for services

func NewDefaultServiceRepository

func NewDefaultServiceRepository(client dynamic.Interface) ServiceRepository

NewDefaultServiceRepository creates ServiceRepository instances

Jump to

Keyboard shortcuts

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