sidecar

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindAddr    string
	Reader      Reader
	MaxRows     int
	Application string
}

type Key

type Key struct {
	Value  interface{}
	Binary []byte
}

Key represents a primary key segment. The 'Value' field should be used unless the key segment is a varbinary field. This is so that the json unmarshaling will decode base64 for the Binary property.

func (Key) ToValue

func (k Key) ToValue() interface{}

type ReadRequest

type ReadRequest struct {
	Key []Key
}

type Reader

type Reader interface {
	GetRowByKey(ctx context.Context, out interface{}, familyName string, tableName string, key ...interface{}) (found bool, err error)
	GetRowsByKeyPrefix(ctx context.Context, familyName string, tableName string, key ...interface{}) (*ctlstore.Rows, error)
	GetLedgerLatency(ctx context.Context) (time.Duration, error)
}

type Sidecar

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

func New

func New(config Config) (*Sidecar, error)

func (*Sidecar) ServeHTTP

func (s *Sidecar) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Sidecar) Start

func (s *Sidecar) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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