diff --git a/plugin/base.go b/plugin/base.go index b7ab63f..dbb08b9 100644 --- a/plugin/base.go +++ b/plugin/base.go @@ -26,14 +26,17 @@ type Accessor interface { Name() string Capacity() int SetCapacity(capactity int) + HandleTimeout() bool + SetHandleTimeout(enable bool) IsExternal() bool } type Base struct { log.Logger - name string - capacity int - external bool + name string + capacity int + external bool + handleTimeout bool } func (b *Base) Init(name string) { @@ -62,6 +65,14 @@ func (b *Base) SetExternal(isExternal bool) { b.external = isExternal } +func (b *Base) HandleTimeout() bool { + return b.handleTimeout +} + +func (b *Base) SetHandleTimeout(handleTimeout bool) { + b.handleTimeout = handleTimeout +} + type SystemOptions struct { Path string `conf:"optional"` Capacity string `conf:"optional"`