api

package
v0.0.1-pre Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package api is a generated GoMock package.

Copyright (c) Microsoft Corporation. Licensed under the MIT license.

Index

Constants

View Source
const (
	Meter       string = "retina-meter"
	ServiceName string = "retina"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPlugin

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

MockPlugin is a mock of Plugin interface.

func NewMockPlugin

func NewMockPlugin(ctrl *gomock.Controller) *MockPlugin

NewMockPlugin creates a new mock instance.

func (*MockPlugin) Compile

func (m *MockPlugin) Compile(arg0 context.Context) error

Compile mocks base method.

func (*MockPlugin) EXPECT

func (m *MockPlugin) EXPECT() *MockPluginMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPlugin) Generate

func (m *MockPlugin) Generate(arg0 context.Context) error

Generate mocks base method.

func (*MockPlugin) Init

func (m *MockPlugin) Init() error

Init mocks base method.

func (*MockPlugin) Name

func (m *MockPlugin) Name() string

Name mocks base method.

func (*MockPlugin) SetupChannel

func (m *MockPlugin) SetupChannel(arg0 chan *v1.Event) error

SetupChannel mocks base method.

func (*MockPlugin) Start

func (m *MockPlugin) Start(arg0 context.Context) error

Start mocks base method.

func (*MockPlugin) Stop

func (m *MockPlugin) Stop() error

Stop mocks base method.

type MockPluginMockRecorder

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

MockPluginMockRecorder is the mock recorder for MockPlugin.

func (*MockPluginMockRecorder) Compile

func (mr *MockPluginMockRecorder) Compile(arg0 interface{}) *gomock.Call

Compile indicates an expected call of Compile.

func (*MockPluginMockRecorder) Generate

func (mr *MockPluginMockRecorder) Generate(arg0 interface{}) *gomock.Call

Generate indicates an expected call of Generate.

func (*MockPluginMockRecorder) Init

func (mr *MockPluginMockRecorder) Init() *gomock.Call

Init indicates an expected call of Init.

func (*MockPluginMockRecorder) Name

func (mr *MockPluginMockRecorder) Name() *gomock.Call

Name indicates an expected call of Name.

func (*MockPluginMockRecorder) SetupChannel

func (mr *MockPluginMockRecorder) SetupChannel(arg0 interface{}) *gomock.Call

SetupChannel indicates an expected call of SetupChannel.

func (*MockPluginMockRecorder) Start

func (mr *MockPluginMockRecorder) Start(arg0 interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockPluginMockRecorder) Stop

func (mr *MockPluginMockRecorder) Stop() *gomock.Call

Stop indicates an expected call of Stop.

type Plugin

type Plugin interface {
	Name() string
	// Generate the plugin specific header files.
	// This maybe no-op for plugins that don't use eBPF.
	Generate(ctx context.Context) error
	// Compile the ebpf to generate bpf object.
	// This maybe no-op for plugins that don't use eBPF.
	Compile(ctx context.Context) error
	// Init initializes plugin specific objects. Plugin has to send data through the channel passed in arg.
	Init() error
	// Start The plugin has to start its execution in collecting traces
	Start(ctx context.Context) error
	// Stop The plugin has to stop its job
	Stop() error
	// Allow adding external channels that clients can use
	// to get data from the plugin. This allows custom post processing of plugin data.
	SetupChannel(chan *v1.Event) error
}

All functions should be idempotent.

type PluginEvent

type PluginEvent struct {
	Name PluginName
}

PluginEvent - Generic plugin event structure to receive data from plugin

type PluginName

type PluginName string

Jump to

Keyboard shortcuts

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