Documentation ¶
Index ¶
Constants ¶
View Source
const ( RESTART_SERVICE_COMMAND = "service_restart" LOAD_CONFIG_COMMAND = "load_config" SET_CONFIG_VALUE_COMMAND = "set_config" )
Variables ¶
View Source
var (
InvalidParamError = errors.New("invalid param in payload")
)
Functions ¶
func NewCommandListener ¶
func NewCommandListener(serviceName string, handler nats.EventHandler) *commandListener
Types ¶
type CommandListener ¶
type LoadConfigCommand ¶
type LoadConfigCommand protocol.RequestMessage
func NewLoadConfigCommand ¶
func NewLoadConfigCommand(msgId uint32, param string) *LoadConfigCommand
func (*LoadConfigCommand) ReadParam ¶
func (command *LoadConfigCommand) ReadParam() (string, error)
type ServiceRestartCommand ¶
type ServiceRestartCommand protocol.RequestMessage
func NewServiceRestartCommand ¶
func NewServiceRestartCommand(msgId uint32) *ServiceRestartCommand
type SetConfigValueCommand ¶
type SetConfigValueCommand protocol.RequestMessage
func NewSetConfigValueCommand ¶
func NewSetConfigValueCommand(msgId uint32, config []string) *SetConfigValueCommand
func (*SetConfigValueCommand) ReadConfig ¶
func (command *SetConfigValueCommand) ReadConfig() ([]string, error)
Click to show internal directories.
Click to hide internal directories.