api

package
v0.0.0-...-1e0ddcb Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//default debug option
	DefaultDebug = false

	// current api version
	CurrentAPIVersion = "/api/v1.0"
)
View Source
const (
	// number of milliseconds for timeout in
	// client http call
	DefaultHTTPTimeout = 2000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(g *config.TGlobal) *Client

func (*Client) ConfigList

func (m *Client) ConfigList(options *ClientOptions) error

func (*Client) ControlBpf

func (m *Client) ControlBpf(options *ClientControlBpfOptions) error

func (*Client) ControlVerify

func (m *Client) ControlVerify(options *ClientOptions) error

func (*Client) MetricsReceive

func (m *Client) MetricsReceive(options *ClientOptions) error

func (*Client) Request

func (m *Client) Request(method string, uri string, content []byte) ([]byte, int, error)

type ClientControlBpfOptions

type ClientControlBpfOptions struct {
	Dryrun    bool
	Option    string
	Value     bool
	ValueList []string
}

type ClientOptions

type ClientOptions struct {
	Dryrun bool
}

type ControlBpfReq

type ControlBpfReq struct {
	Dryrun    bool     `json:"dryrun"`
	Option    string   `json:"option"`
	Value     bool     `json:"value"`
	ValueList []string `json:"values"`
}

func (*ControlBpfReq) AsJSON

func (c *ControlBpfReq) AsJSON() []byte

func (*ControlBpfReq) AsString

func (c *ControlBpfReq) AsString() string

type ControlVerifyReq

type ControlVerifyReq struct {
	Dryrun bool `json:"dryrun"`
}

func (*ControlVerifyReq) AsJSON

func (c *ControlVerifyReq) AsJSON() []byte

func (*ControlVerifyReq) AsString

func (c *ControlVerifyReq) AsString() string

type MetricsReceiveReq

type MetricsReceiveReq struct {
	Dryrun bool `json:"dryrun"`
}

func (*MetricsReceiveReq) AsJSON

func (c *MetricsReceiveReq) AsJSON() []byte

func (*MetricsReceiveReq) AsString

func (c *MetricsReceiveReq) AsString() string

type Server

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

func NewServer

func NewServer(g *config.TGlobal) *Server

func (*Server) CreateGroup

func (m *Server) CreateGroup() *echo.Group

func (*Server) GetGroup

func (m *Server) GetGroup() *echo.Group

func (*Server) Run

func (m *Server) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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