Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NullLogger ¶
func NullLogger() logrus.FieldLogger
func PrefixMessage ¶
func PrefixMessage(pluginInfo catalog.PluginInfo, message string) string
PrefixMessage prefixes the given message with plugin information. The prefix is only applied if it is not already applied.
Types ¶
type Facade ¶
type Facade struct { catalog.PluginInfo Log logrus.FieldLogger }
Facade is embedded by plugin interface facade implementations as a convenient way to embed PluginInfo but also provide a set of convenient functions for embellishing and generating errors that have the plugin name prefixed.
func FixedFacade ¶
func FixedFacade(pluginName, pluginType string, log logrus.FieldLogger) Facade
FixedFacade is a helper that creates a facade from fixed information, i.e. not the product of a loaded plugin.
func (*Facade) Error ¶
Error creates a gRPC status with the given code and message. The message will be prefixed with the plugin name.
func (*Facade) Errorf ¶
Errorf creates a gRPC status with the given code and formatted message. The message will be prefixed with the plugin name.
func (*Facade) InitInfo ¶
func (f *Facade) InitInfo(pluginInfo catalog.PluginInfo)
InitInfo partially satisfies the catalog.Facade interface
func (*Facade) InitLog ¶
func (f *Facade) InitLog(log logrus.FieldLogger)
InitLog partially satisfies the catalog.Facade interface