standalone

package
v0.188.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 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

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

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

func CreateStandaloneAddressFile(address, dir string) error

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

func CreateStandalonePIDFile

func CreateStandalonePIDFile(pid int, dir string) error

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

func FindAndKillCurrentPlugin

func FindAndKillCurrentPlugin(dir string)

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

func RunDummyPluginLocator

func RunDummyPluginLocator(address string)

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

Types

type ClientSettings

type ClientSettings struct {
	TargetAddress string
	TargetPID     int
}

func ClientModeEnabled

func ClientModeEnabled(pluginID string) (ClientSettings, bool)

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

type ServerSettings

type ServerSettings struct {
	Address string
	Dir     string
}

func NewServerSettings

func NewServerSettings(address, dir string) ServerSettings

func ServerModeEnabled

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