otelbench

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvSecuritySource added in v0.9.0

func EnvSecuritySource() otelbotapi.SecuritySource

func NewError added in v0.9.0

func NewError(ctx context.Context, err Error) *otelbotapi.ErrorStatusCode

NewError creates new structured error response. All fields are optional.

Types

type Error added in v0.9.0

type Error struct {
	StatusCode int
	Message    string
}

type Handler added in v0.9.0

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

Handler handles otelbench api.

func NewHandler added in v0.9.0

func NewHandler(db *ent.Client, m *app.Metrics) *Handler

NewHandler initializes and returns a new Handler.

func (Handler) GetStatus added in v0.9.0

func (h Handler) GetStatus(ctx context.Context) (*otelbotapi.GetStatusOK, error)

func (Handler) HandleTokenAuth added in v0.9.0

func (h Handler) HandleTokenAuth(ctx context.Context, _ string, t otelbotapi.TokenAuth) (context.Context, error)

func (Handler) NewError added in v0.9.0

func (h Handler) NewError(ctx context.Context, err error) *otelbotapi.ErrorStatusCode

func (Handler) Ping added in v0.9.0

func (h Handler) Ping(ctx context.Context) error

func (*Handler) SubmitReport added in v0.10.0

func (h *Handler) SubmitReport(ctx context.Context, req *otelbotapi.SubmitReportReq) error

type Reader

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

Reader reads data from an io.Reader and decodes it as "rwq" protocol.

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Data

func (r *Reader) Data() []byte

func (*Reader) Decode

func (r *Reader) Decode() bool

func (*Reader) Err

func (r *Reader) Err() error

type Writer

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

Writer writes data to an io.Writer as "rwq" protocol.

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Encode

func (w *Writer) Encode(data []byte) error

Directories

Path Synopsis
ent

Jump to

Keyboard shortcuts

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