filter

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HandshakeConfig = plugin.HandshakeConfig{
		ProtocolVersion:  1,
		MagicCookieKey:   "CT_MONITOR_PLUGIN",
		MagicCookieValue: "issuance_filter",
	}
	PluginKey = "issuance"
	PluginMap = map[string]plugin.Plugin{
		PluginKey: &IssuanceFilterPlugin{},
	}
)

Functions

func ApplyFilters

func ApplyFilters(filterPaths []string, issuances []api.Issuance) ([]api.Issuance, error)

ApplyFilters runs the filter plugins and returns the resulting issuances. Plugin errors are ignored. It is up to the plugin to log them appropriately.

Types

type IssuanceFilter

type IssuanceFilter interface {
	Filter(is []api.Issuance) ([]api.Issuance, error)
}

IssuanceFilter is the interface exposed as a plugin.

type IssuanceFilterPlugin

type IssuanceFilterPlugin struct {
	Impl IssuanceFilter
}

IssuanceFilterPlugin us an implementation of plugin.Plugin.

func (*IssuanceFilterPlugin) Client

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

func (*IssuanceFilterPlugin) Server

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

type IssuanceFilterRPCClient

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

IssuanceFilterRPC is a plugin implementation over RPC.

func (*IssuanceFilterRPCClient) Filter

func (f *IssuanceFilterRPCClient) Filter(is []api.Issuance) ([]api.Issuance, error)

type IssuanceFilterRPCServer

type IssuanceFilterRPCServer struct {
	Impl IssuanceFilter
}

IssuanceFilterRPCServer is the RPC server that IssuanceFilterRPC talks to.

func (*IssuanceFilterRPCServer) Filter

func (s *IssuanceFilterRPCServer) Filter(is []api.Issuance, resp *[]api.Issuance) error

Jump to

Keyboard shortcuts

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