core

package
v2.0.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	TotalRecvInputFrame = promauto.NewCounter(prometheus.CounterOpts{
		Name: "dtap_input_recv_frame_total",
		Help: "The total number of input frames",
	})
	TotalLostInputFrame = promauto.NewCounter(prometheus.CounterOpts{
		Name: "dtap_input_lost_frame_total",
		Help: "The total number of lost input frames from buffer",
	})
	TotalRecvOutputFrame = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "dtap_output_recv_frame_total",
			Help: "The total number of output frames",
		},
		[]string{"og"},
	)
	TotalLostOutputFrame = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "dtap_output_lost_frame_total",
			Help: "The total number of lost output frames from buffer",
		},
		[]string{"og"},
	)
)
View Source
var (
	TotalGlobalFilteredFrame = promauto.NewCounter(prometheus.CounterOpts{
		Name: "dtap_global_filtered_total",
		Help: "The total number of global filtered frames",
	})
	TotalOGFilteredFrame = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "dtap_output_group_filtered_total",
		Help: "The total number of output group filtered frames",
	}, []string{"og"})
)

Functions

func NewBufferFromBufferConfig

func NewBufferFromBufferConfig(c *config.BufferConfig, inCounter, lostCounter types.Counter) (types.Buffer, error)

func NewOutputBufferFromBufferConfig

func NewOutputBufferFromBufferConfig(c *config.BufferConfig) (types.Buffer, error)

Types

type Controller

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

func NewController

func NewController(cfg *config.Config, logger *zap.Logger) *Controller

func (*Controller) OnShutdown

func (c *Controller) OnShutdown(f func() error)

add shutdown function for plugin shutdown process

func (*Controller) OnStartup

func (c *Controller) OnStartup(f func() error)

add startup function for plugin startup process

func (*Controller) PrometheusListen

func (c *Controller) PrometheusListen(ctx context.Context)

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

main running function

func (*Controller) Setup

func (c *Controller) Setup() error

setup controller by config

func (*Controller) SetupOutputGroup

func (c *Controller) SetupOutputGroup() error

setup Output Plugin

type OutputGroup

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

Directories

Path Synopsis
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
* Copyright (c) 2022 Manabu Sonoda * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.

Jump to

Keyboard shortcuts

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