service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextIPC

func NextIPC(curIPC string, ipcList []string) string

NextIPC get next ipc from a list

Types

type IpcManager

type IpcManager struct {
	// contains filtered or unexported fields
}

IpcManager has the global IPC, it takes care of informing all fetcher when IPC is changed

func GetIpcManager

func GetIpcManager() *IpcManager

GetIpcManager singleton impl

func (*IpcManager) ChangeIPC

func (im *IpcManager) ChangeIPC()

ChangeIPC change IPC and inform all subscribers about the change

func (*IpcManager) EnableSwitchIPC added in v1.0.0

func (im *IpcManager) EnableSwitchIPC()

EnableSwitchIPC enable ForceChangeIPC

func (*IpcManager) ForceChangeIPC added in v1.0.0

func (im *IpcManager) ForceChangeIPC()

ForceChangeIPC force change ipc, otherwise panic

func (*IpcManager) GetIPC

func (im *IpcManager) GetIPC() string

GetIPC getter for ipc

func (*IpcManager) SetIPC

func (im *IpcManager) SetIPC(ipcs []string) error

SetIPC gets called from main

func (*IpcManager) Subscribe

func (im *IpcManager) Subscribe(sub *IpcSubscriber)

Subscribe method for a subscriber to call

type IpcSubscriber

type IpcSubscriber interface {
	IpcUpdated(ipc string)
	Name() string
}

IpcSubscriber interface for subscribers

Jump to

Keyboard shortcuts

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