Documentation ¶
Index ¶
- type Hclog2ZapLogger
- func (l Hclog2ZapLogger) Debug(msg string, args ...interface{})
- func (l Hclog2ZapLogger) Error(msg string, args ...interface{})
- func (l Hclog2ZapLogger) Info(msg string, args ...interface{})
- func (l Hclog2ZapLogger) IsDebug() bool
- func (l Hclog2ZapLogger) IsError() bool
- func (l Hclog2ZapLogger) IsInfo() bool
- func (l Hclog2ZapLogger) IsTrace() bool
- func (l Hclog2ZapLogger) IsWarn() bool
- func (l Hclog2ZapLogger) Named(name string) hclog.Logger
- func (l Hclog2ZapLogger) ResetNamed(name string) hclog.Logger
- func (l Hclog2ZapLogger) SetLevel(level hclog.Level)
- func (l Hclog2ZapLogger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
- func (l Hclog2ZapLogger) Trace(msg string, args ...interface{})
- func (l Hclog2ZapLogger) Warn(msg string, args ...interface{})
- func (l Hclog2ZapLogger) With(args ...interface{}) hclog.Logger
- type Manager
- type Plugin
- type Reacter
- type ReacterClient
- type ReacterRPCPlugin
- type ReacterReactArgs
- type ReacterReactResponse
- type ReacterServer
- type ReacterSubscriptionsResponse
- type Subscription
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hclog2ZapLogger ¶
Hclog2ZapLogger implements Hashicorp's hclog.Logger interface using Uber's zap.Logger. It's a workaround for plugin system. go-plugin doesn't support other logger than hclog. This logger implements only methods used by the go-plugin.
func (Hclog2ZapLogger) Debug ¶
func (l Hclog2ZapLogger) Debug(msg string, args ...interface{})
Debug implementation.
func (Hclog2ZapLogger) Error ¶
func (l Hclog2ZapLogger) Error(msg string, args ...interface{})
Error implementation.
func (Hclog2ZapLogger) Info ¶
func (l Hclog2ZapLogger) Info(msg string, args ...interface{})
Info implementation.
func (Hclog2ZapLogger) Named ¶
func (l Hclog2ZapLogger) Named(name string) hclog.Logger
Named implementation.
func (Hclog2ZapLogger) ResetNamed ¶
func (l Hclog2ZapLogger) ResetNamed(name string) hclog.Logger
ResetNamed implementation.
func (Hclog2ZapLogger) SetLevel ¶
func (l Hclog2ZapLogger) SetLevel(level hclog.Level)
SetLevel implementation.
func (Hclog2ZapLogger) StandardLogger ¶
func (l Hclog2ZapLogger) StandardLogger(opts *hclog.StandardLoggerOptions) *log.Logger
StandardLogger implementation.
func (Hclog2ZapLogger) Trace ¶
func (l Hclog2ZapLogger) Trace(msg string, args ...interface{})
Trace implementation.
func (Hclog2ZapLogger) Warn ¶
func (l Hclog2ZapLogger) Warn(msg string, args ...interface{})
Warn implementation.
func (Hclog2ZapLogger) With ¶
func (l Hclog2ZapLogger) With(args ...interface{}) hclog.Logger
With implementation.
type Manager ¶
Manager handles lifecycle of plugin management.
func NewManager ¶
NewManager creates new Manager.
type Reacter ¶
type Reacter interface { Subscriptions() []Subscription React(event eventpkg.Event) error }
Reacter allows reacting on subscribed event types.
type ReacterClient ¶
type ReacterClient struct {
// contains filtered or unexported fields
}
ReacterClient is a RPC implementation of Reacter.
func (*ReacterClient) React ¶
func (r *ReacterClient) React(event eventpkg.Event) error
React calls plugin implementation.
func (*ReacterClient) Subscriptions ¶
func (r *ReacterClient) Subscriptions() []Subscription
Subscriptions call plugin implementation.
type ReacterRPCPlugin ¶
type ReacterRPCPlugin struct {
Reacter Reacter
}
ReacterRPCPlugin is the go-plugin's Plugin implementation.
type ReacterReactArgs ¶
ReacterReactArgs RPC args
type ReacterReactResponse ¶
type ReacterReactResponse struct {
Error *goplugin.BasicError
}
ReacterReactResponse RPC response
type ReacterServer ¶
type ReacterServer struct {
Reacter Reacter
}
ReacterServer is a net/rpc compatibile structure for serving a Reacter.
func (*ReacterServer) React ¶
func (r *ReacterServer) React(args *ReacterReactArgs, resp *ReacterReactResponse) error
React server implementation.
func (*ReacterServer) Subscriptions ¶
func (r *ReacterServer) Subscriptions(_ interface{}, resp *ReacterSubscriptionsResponse) error
Subscriptions server implementation.
type ReacterSubscriptionsResponse ¶
type ReacterSubscriptionsResponse struct {
Subscriptions []Subscription
}
ReacterSubscriptionsResponse RPC response
type Subscription ¶
Subscription use by plugin to indicate which event it wants to react to.