plugin

package module
v0.6.0-beta.20211219.2058 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2021 License: BSD-3-Clause Imports: 26 Imported by: 3

README

Crawlab Plugin Framework (CPF)

Crawlab Plugin framework (CPF) is a framework for developing plugins in order to extend beyond existing functionalities in Crawlab. It allows Crawlab developers to develop plugins if they would like to customize Crawlab.

Develop with CPF

(TBD)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGrpcClient

func NewGrpcClient() (c interfaces.GrpcClient, err error)

Types

type BasePlugin

type BasePlugin struct {
	// contains filtered or unexported fields
}

func (*BasePlugin) GetClient

func (p *BasePlugin) GetClient() interfaces.GrpcClient

func (*BasePlugin) Init

func (p *BasePlugin) Init()

type EventService

type EventService struct {
	// contains filtered or unexported fields
}

func (*EventService) GetStream

func (svc *EventService) GetStream() (stream grpc.PluginService_SubscribeClient)

func (*EventService) Subscribe

func (svc *EventService) Subscribe() (err error)

type EventServiceInterface

type EventServiceInterface interface {
	Subscribe() (err error)
	GetStream() (stream grpc.PluginService_SubscribeClient)
}

func NewEventService

func NewEventService(internal *Internal) (svc EventServiceInterface)

type Internal

type Internal struct {
	// contains filtered or unexported fields
}

func NewInternal

func NewInternal() *Internal

func (*Internal) GetApi

func (internal *Internal) GetApi() *gin.Engine

func (*Internal) GetApiServer

func (internal *Internal) GetApiServer() *http.Server

func (*Internal) GetEventService

func (internal *Internal) GetEventService() EventServiceInterface

func (*Internal) GetGrpcClient

func (internal *Internal) GetGrpcClient() interfaces.GrpcClient

func (*Internal) GetModelService

func (internal *Internal) GetModelService() interfaces.GrpcClientModelService

func (*Internal) StartApi

func (internal *Internal) StartApi()

func (*Internal) StopApi

func (internal *Internal) StopApi()

func (*Internal) Wait

func (internal *Internal) Wait()

type Plugin

type Plugin interface {
	Init() error
	Start() error
	Stop() error
	Wait()
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL