dashboard

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 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" mapstructure:"enabled,omitempty"`
	// ListenAddress is the address to listen on.
	ListenAddress string `` /* 135-byte string literal not displayed */
	// TLSCertFile is the path to a certificate file to use for TLS.
	TLSCertFile string `` /* 131-byte string literal not displayed */
	// TLSKeyFile is the path to a key file to use for TLS.
	TLSKeyFile string `` /* 127-byte string literal not displayed */
	// Prefix is the prefix to use for the dashboard.
	Prefix string `json:"prefix,omitempty" yaml:"prefix,omitempty" toml:"prefix,omitempty" mapstructure:"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.

func (*Options) DeepCopy added in v0.1.13

func (o *Options) DeepCopy() *Options

DeepCopy returns a deep copy of the options.

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