state

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package runconfig stores cloudprober config that is specific to a single invocation. e.g., servers injected by external cloudprober users.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWebHandler

func AddWebHandler(path string, f func(w http.ResponseWriter, r *http.Request)) error
func AllLinks() []string

func BuildTimestamp

func BuildTimestamp() time.Time

BuildTimestamp returns the recorded build timestamp.

func ConfigFilePath

func ConfigFilePath() string

func DefaultGRPCServer

func DefaultGRPCServer() *grpc.Server

DefaultGRPCServer returns the configured gRPC server and nil if gRPC server was not set.

func DefaultHTTPServeMux

func DefaultHTTPServeMux() *http.ServeMux

DefaultHTTPServeMux returns the default HTTP ServeMux.

func IsHandled

func IsHandled(url string) bool

func LocalRDSServer

func LocalRDSServer() *rdsserver.Server

LocalRDSServer returns the local RDS server, set through the SetLocalRDSServer() call.

func SetBuildTimestamp

func SetBuildTimestamp(ts time.Time)

SetBuildTimestamp sets the cloudprober build timestamp.

func SetConfigFilePath

func SetConfigFilePath(configFilePath string)

func SetDefaultGRPCServer

func SetDefaultGRPCServer(s *grpc.Server)

SetDefaultGRPCServer sets the default gRPC server.

func SetDefaultHTTPServeMux

func SetDefaultHTTPServeMux(mux *http.ServeMux)

SetDefaultHTTPServeMux stores the default HTTP ServeMux in state. This allows other modules to add their own handlers to the common ServeMux.

func SetLocalRDSServer

func SetLocalRDSServer(srv *rdsserver.Server)

SetLocalRDSServer stores local RDS server in the state. It can later be retrieved throuhg LocalRDSServer().

func SetVersion

func SetVersion(version string)

SetVersion sets the cloudprober version.

func Version

func Version() string

Version returns the runconfig version set through the SetVersion() function call. It's useful only if called after SetVersion(), otherwise it will return an empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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