servingstore

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	servingStore ServingStorer,
	inputOptions ...Option) numaflow.Server

NewServer creates a new server object.

Types

type GetDatum

type GetDatum interface {
	ID() string
}

GetDatum is the interface to expose methods to retrieve from the Get rpc.

type GetRequest

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

GetRequest has details on the Get rpc.

func (*GetRequest) ID

func (g *GetRequest) ID() string

ID is the unique ID original request which is used get the data stored in the Store.

type Option

type Option func(*options)

Option is the interface to apply options.

func WithMaxMessageSize

func WithMaxMessageSize(size int) Option

WithMaxMessageSize sets the server max receive message size and the server max send message size to the given size.

func WithServerInfoFilePath

func WithServerInfoFilePath(f string) Option

WithServerInfoFilePath sets the server info file path to the given path.

func WithSockAddr

func WithSockAddr(addr string) Option

WithSockAddr start the server with the given sock addr. This is mainly used for testing purpose.

type Payload

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

Payload is each independent result stored in the Store for the given ID.

func NewPayload

func NewPayload(origin string, value []byte) Payload

NewPayload creates a new Payload from the given value.

func (*Payload) Origin

func (p *Payload) Origin() string

Origin returns the origin name.

func (*Payload) Value

func (p *Payload) Value() []byte

Value returns the value of the Payload.

type PutDatum

type PutDatum interface {
	ID() string
	Payloads() []Payload
}

PutDatum interface exposes methods to retrieve data from the Put rpc.

type PutRequest

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

PutRequest contains the details to store the payload to the Store.

func (*PutRequest) ID

func (p *PutRequest) ID() string

ID returns the id of the original request.

func (*PutRequest) Payloads

func (p *PutRequest) Payloads() []Payload

Payloads returns the payloads to be stored.

type Service

type Service struct {
	servingpb.UnimplementedServingStoreServer
	ServingStore ServingStorer
	// contains filtered or unexported fields
}

Service implements the proto gen server interface

func (*Service) Get

Get gets the data stored in the Store.

func (*Service) IsReady

IsReady is used to indicate that the server is ready.

func (*Service) Put

Put puts the payload into the Store.

type ServingStorer

type ServingStorer interface {
	// Put is to put data into the Serving Store.
	Put(ctx context.Context, put PutDatum)

	// Get is to retrieve data from the Serving Store.
	Get(ctx context.Context, get GetDatum) StoredResult
}

ServingStorer is the interface for serving store to store and retrieve from a custom store.

type StoredResult

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

StoredResult is the data stored in the store per origin.

func NewStoredResult

func NewStoredResult(id string, payloads []Payload) StoredResult

NewStoredResult creates a new StoreResult from the provided origin and payloads.

Jump to

Keyboard shortcuts

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