dataapi

package
v1.24.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package dataapi provides a Data API wrapper, which allows DocDB to be used over HTTP instead of MongoDB wire protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListenOpts

type ListenOpts struct {
	L       *slog.Logger
	M       *middleware.Middleware
	TCPAddr string
	Auth    bool
}

ListenOpts represents Listen options.

type Listener

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

Listener represents Data API TCP listener and HTTP handler.

func Listen

func Listen(opts *ListenOpts) (*Listener, error)

Listen creates a new Data API handler and starts listener on the given TCP address. Listener.Run must be called on the returned value.

func (*Listener) Addr

func (lis *Listener) Addr() net.Addr

Addr returns TCP listener's address. It can be used to determine an actually used port, if it was zero.

func (*Listener) Collect

func (lis *Listener) Collect(ch chan<- prometheus.Metric)

Collect implements prometheus.Collector.

func (*Listener) Describe

func (lis *Listener) Describe(ch chan<- *prometheus.Desc)

Describe implements prometheus.Collector.

func (*Listener) Run

func (lis *Listener) Run(ctx context.Context)

Run runs Data API handler until ctx is canceled.

It exits when handler is stopped and listener closed.

Directories

Path Synopsis
Package api provides primitives to interact with the openapi HTTP API.
Package api provides primitives to interact with the openapi HTTP API.
Package server provides a Data API server handlers.
Package server provides a Data API server handlers.

Jump to

Keyboard shortcuts

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