mongoproxy

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 31 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerClosed = errors.New("server closed")
	SKIP_RECOVER    = false
)

Functions

This section is empty.

Types

type ConnState

type ConnState int
const (
	StateNew ConnState = iota
	StateActive
	StateIdle
	StateClosed
)

func (ConnState) String

func (c ConnState) String() string

type Proxy

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

func NewProxy

func NewProxy(l net.Listener, cfg *config.Config) (*Proxy, error)

func (*Proxy) Addr

func (p *Proxy) Addr() string

func (*Proxy) CloseCursor

func (p *Proxy) CloseCursor(cursorID int64)

func (*Proxy) GetCursor

func (p *Proxy) GetCursor(cursorID int64) *plugins.CursorCacheEntry

func (*Proxy) HandleMongo

func (p *Proxy) HandleMongo(ctx context.Context, req *plugins.Request, d bson.D) (bson.D, error)

HandleMongo needs to actually disbatch the command. This includes loading the command into a struct, processing the pipeline, and then returning

func (*Proxy) Serve

func (p *Proxy) Serve() error

func (*Proxy) Shutdown

func (p *Proxy) Shutdown(ctx context.Context) error

Jump to

Keyboard shortcuts

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