plugininterface

package
v0.0.0-...-5aa0336 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gatherer

type Gatherer interface {
	Gather(context context.Context, factsRequests []entities.FactRequest) ([]entities.Fact, error)
}

Gatherer is the interface exposed as a plugin.

type GathererPlugin

type GathererPlugin struct {
	// Impl Injection
	Impl Gatherer
}

This is the implementation of plugin.Plugin

func (GathererPlugin) Client

func (GathererPlugin) Client(_ *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*GathererPlugin) Server

func (p *GathererPlugin) Server(*plugin.MuxBroker) (interface{}, error)

type GathererRPC

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

func (*GathererRPC) RequestGathering

func (g *GathererRPC) RequestGathering(
	ctx context.Context,
	factsRequest []entities.FactRequest,
) ([]entities.Fact, error)

type GathererRPCServer

type GathererRPCServer struct {
	Impl Gatherer
	// contains filtered or unexported fields
}

func (*GathererRPCServer) Cancel

func (s *GathererRPCServer) Cancel(requestID string, _ *[]entities.Fact) (_ error)

func (*GathererRPCServer) ServeGathering

func (s *GathererRPCServer) ServeGathering(args GatheringArgs, resp *[]entities.Fact) error

type GatheringArgs

type GatheringArgs struct {
	FactRequests []entities.FactRequest
	RequestID    string
}

Jump to

Keyboard shortcuts

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