gateway

package
v0.0.0-...-fc28734 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const DiskCache = "disk"

Variables

This section is empty.

Functions

func Health

func Health(c *gin.Context)

func NewDriverEngine

func NewDriverEngine(ctx dm.Context, cfg config.Config) (models.DriverEngine, error)

func PackageResponse

func PackageResponse(res interface{}) (int, interface{})

PackageResponse PackageResponse

Types

type Gateway

type Gateway interface {
	Close()
}

func NewGateway

func NewGateway(ctx dm.Context, cfg config.Config) (Gateway, error)

type HandlerFunc

type HandlerFunc func(c *gin.Context) (any, error)

type ReportImpl

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

func NewReport

func NewReport(ch map[string]*driverControl) *ReportImpl

func (*ReportImpl) Post

func (m *ReportImpl) Post(req *plugin.Request) (*plugin.Response, error)

Post 驱动数据采集上报接口,驱动调用,采集消息放入channel

func (*ReportImpl) State

func (m *ReportImpl) State(req *plugin.Request) (*plugin.Response, error)

State 驱动状态上报接口,驱动调用,消息放入channel

type Server

type Server interface {
	Run()
	InitRouter()
	io.Closer
}

func NewGatewayServer

func NewGatewayServer(cfg config.Config, driver models.DriverEngine) (Server, error)

Jump to

Keyboard shortcuts

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