mongoproxy

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: MIT Imports: 31 Imported by: 0

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