Documentation ¶
Index ¶
- func CleanupStandaloneAddressFile(info ServerSettings) error
- func CleanupStandalonePIDFile(info ServerSettings) error
- func CreateStandaloneAddressFile(address, dir string) error
- func CreateStandalonePIDFile(pid int, dir string) error
- func FindAndKillCurrentPlugin(dir string)
- func RunDummyPluginLocator(address string)
- type ClientSettings
- type ServerSettings
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 ¶
CreateStandaloneAddressFile creates the standalone.txt file containing the address of the GRPC server
func CreateStandalonePIDFile ¶
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 ¶
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 ¶
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.