Documentation ¶
Index ¶
- Constants
- type Frame
- type Plugin
- func (plugin *Plugin) Fini()
- func (plugin *Plugin) Http() bool
- func (plugin *Plugin) HttpHandle(req *tbhttp.Request) (*tbhttp.Response, error)
- func (plugin *Plugin) HttpMethod() string
- func (plugin *Plugin) HttpPath() string
- func (plugin *Plugin) Kafka() bool
- func (plugin *Plugin) KafkaGroup() string
- func (plugin *Plugin) KafkaHandle(msg *tbkafka.CGMessage)
- func (plugin *Plugin) KafkaTopic() string
- func (plugin *Plugin) Load() error
- func (plugin *Plugin) Log() *tblog.TbLog
- func (plugin *Plugin) Name() string
- func (plugin *Plugin) Reload(content []byte) error
- func (plugin *Plugin) Rename(name string) error
Constants ¶
View Source
const ( ExtJS = ".js" ExtLog = ".log" )
View Source
const ( MetaRoute = "route" MetaConsume = "consume" MetaMatch = "match" MetaPath = "path" MetaMethod = "method" MetaTopic = "topic" MetaGroup = "group" MetaHandler = "handler" )
View Source
const ( FuncRegister = "register" FuncRequire = "require" VarContext = "context" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
func NewPlugin ¶
plugin uses name as runtime context indexing for looking-up resources, like logging instance. the changing of name must then recreate ctx.
func (*Plugin) HttpHandle ¶
func (*Plugin) HttpMethod ¶
func (*Plugin) KafkaGroup ¶
func (*Plugin) KafkaHandle ¶
func (*Plugin) KafkaTopic ¶
Click to show internal directories.
Click to hide internal directories.