MCPcopy
hub / github.com/gotify/server / Instance

Method Instance

plugin/manager.go:167–175  ·  view source on GitHub ↗

Instance returns an instance with the given ID.

(pluginID uint)

Source from the content-addressed store, hash-verified

165
166// Instance returns an instance with the given ID.
167func (m *Manager) Instance(pluginID uint) (compat.PluginInstance, error) {
168 m.mutex.RLock()
169 defer m.mutex.RUnlock()
170
171 if instance, ok := m.instances[pluginID]; ok {
172 return instance, nil
173 }
174 return nil, errors.New("instance not found")
175}
176
177// HasInstance returns whether the given plugin ID has a corresponding instance.
178func (m *Manager) HasInstance(pluginID uint) bool {

Calls

no outgoing calls