dashboard

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package dashboard contains a service that serves a web dashboard. nolint

Index

Constants

View Source
const (
	DashboardEnabledEnvVar = "SERVICES_DASHBOARD_ENABLED"
	DashboardListenEnvVar  = "SERVICES_DASHBOARD_LISTEN_ADDRESS"
	DashboardTLSCertEnvVar = "SERVICES_DASHBOARD_TLS_CERT_FILE"
	DashboardTLSKeyEnvVar  = "SERVICES_DASHBOARD_TLS_KEY_FILE"
	DashboardPrefixEnvVar  = "SERVICES_DASHBOARD_PREFIX"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Enabled is whether the dashboard is enabled.
	Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty" toml:"enabled,omitempty"`
	// ListenAddress is the address to listen on.
	ListenAddress string `json:"listen-address,omitempty" yaml:"listen-address,omitempty" toml:"listen-address,omitempty"`
	// TLSCertFile is the path to a certificate file to use for TLS.
	TLSCertFile string `json:"tls-cert-file,omitempty" yaml:"tls-cert-file,omitempty" toml:"tls-cert-file,omitempty"`
	// TLSKeyFile is the path to a key file to use for TLS.
	TLSKeyFile string `json:"tls-key-file,omitempty" yaml:"tls-key-file,omitempty" toml:"tls-key-file,omitempty"`
	// Prefix is the prefix to use for the dashboard.
	Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty" toml:"prefix,omitempty"`
}

Options contains the options for the dashboard service.

func NewOptions

func NewOptions() *Options

NewOptions creates a new Options with default values.

func (*Options) BindFlags

func (o *Options) BindFlags(fs *flag.FlagSet, prefix ...string)

BindFlags binds the options to a flag set.

type Server

type Server struct {
	*http.Server
}

func NewServer

func NewServer(backend *grpc.Server, opts *Options) (*Server, error)

NewServer returns a new Dashboard Server.

func (*Server) ListenAndServe

func (s *Server) ListenAndServe() error

Jump to

Keyboard shortcuts

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