application

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package application provides common utilities to create open-keyless applications with.

Index

Constants

View Source
const (
	// OpenKeylessController application type.
	OpenKeylessController = "open-keyless-controller"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	AppType string
	Config  Config
}

Application is an object used to provide common application functionality for open-keyless based applications.

func NewApplication

func NewApplication(config Config, appType string) *Application

NewApplication provides an instantiated Application object with the provided configuration and type.

func (*Application) PrintBanner

func (app *Application) PrintBanner()

PrintBanner prints a banner message. This should be called once the application has been fully started.

type Config

type Config struct {
	// LogLevel the logging level for the application.
	LogLevel logrus.Level

	// MetricsEnabled whether or not to enable the prometheus metrics endpoint.
	MetricsEnabled bool

	// AdminInterface is the interface string for the admin endpoints. Ex "192.168.10.100:8081". The IP address can be
	// excluded for all interfaces. Ex ":8081".
	AdminInterface string
}

Config is a configuration object for applications.

Jump to

Keyboard shortcuts

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