MCPcopy
hub / github.com/mattermost/mattermost / GetPluginState

Method GetPluginState

server/public/plugin/environment.go:182–189  ·  view source on GitHub ↗

GetPluginState returns the current state of a plugin (disabled, running, or error)

(id string)

Source from the content-addressed store, hash-verified

180
181// GetPluginState returns the current state of a plugin (disabled, running, or error)
182func (env *Environment) GetPluginState(id string) int {
183 rp, ok := env.registeredPlugins.Load(id)
184 if !ok {
185 return model.PluginStateNotRunning
186 }
187
188 return rp.(registeredPlugin).State
189}
190
191// setPluginState sets the current state of a plugin (disabled, running, or error)
192func (env *Environment) setPluginState(id string, state int) {

Callers 3

IsActiveMethod · 0.95
StatusesMethod · 0.95
TestHealthCheckJobFunction · 0.80

Calls 1

LoadMethod · 0.65

Tested by 1

TestHealthCheckJobFunction · 0.64