standalone

package
v0.233.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanupStandaloneAddressFile added in v0.156.0

func CleanupStandaloneAddressFile(info ServerSettings) error

CleanupStandaloneAddressFile attempts to delete standalone.txt from the specified folder. If the file does not exist, the function returns nil.

func CleanupStandalonePIDFile added in v0.156.0

func CleanupStandalonePIDFile(info ServerSettings) error

CleanupStandalonePIDFile attempts to delete pid.txt from the specified folder. If the file does not exist, the function returns nil.

func CreateStandaloneAddressFile added in v0.156.0

func CreateStandaloneAddressFile(address, dir string) error

CreateStandaloneAddressFile creates the standalone.txt file containing the address of the GRPC server

func CreateStandalonePIDFile added in v0.156.0

func CreateStandalonePIDFile(pid int, dir string) error

CreateStandalonePIDFile creates the pid.txt file containing the PID of the GRPC server process

func FindAndKillCurrentPlugin added in v0.156.0

func FindAndKillCurrentPlugin(dir string)

FindAndKillCurrentPlugin kills the currently registered plugin, causing Grafana to restart it and connect to our new host.

func RunDummyPluginLocator

func RunDummyPluginLocator(address string)

RunDummyPluginLocator runs the standalone server locator that Grafana uses to connect to the standalone GRPC server.

Types

type ClientSettings added in v0.165.0

type ClientSettings struct {
	TargetAddress string
	TargetPID     int
}

func ClientModeEnabled added in v0.165.0

func ClientModeEnabled(pluginID string) (ClientSettings, bool)

ClientModeEnabled returns standalone server connection settings if a standalone server is running and can be reached.

type ServerSettings added in v0.165.0

type ServerSettings struct {
	Address string
	Dir     string
}

func NewServerSettings added in v0.165.0

func NewServerSettings(address, dir string) ServerSettings

func ServerModeEnabled added in v0.165.0

func ServerModeEnabled(pluginID string) (ServerSettings, bool)

ServerModeEnabled returns true if the plugin should run in standalone server mode.

Jump to

Keyboard shortcuts

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