Documentation
¶
Index ¶
- func NewServer(servingStore ServingStorer, inputOptions ...Option) numaflow.Server
- type GetDatum
- type GetRequest
- type Option
- type Payload
- type PutDatum
- type PutRequest
- type Service
- func (s *Service) Get(ctx context.Context, request *servingpb.GetRequest) (*servingpb.GetResponse, error)
- func (s *Service) IsReady(_ context.Context, _ *emptypb.Empty) (*servingpb.ReadyResponse, error)
- func (s *Service) Put(ctx context.Context, request *servingpb.PutRequest) (*servingpb.PutResponse, error)
- type ServingStorer
- type StoredResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
WithMaxMessageSize sets the server max receive message size and the server max send message size to the given size.
func WithServerInfoFilePath ¶
WithServerInfoFilePath sets the server info file path to the given path.
func WithSockAddr ¶
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 ¶
NewPayload creates a new Payload from the given value.
type PutRequest ¶
type PutRequest struct {
// contains filtered or unexported fields
}
PutRequest contains the details to store the payload to the Store.
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 ¶
func (s *Service) Get(ctx context.Context, request *servingpb.GetRequest) (*servingpb.GetResponse, error)
Get gets the data stored in the Store.
func (*Service) Put ¶
func (s *Service) Put(ctx context.Context, request *servingpb.PutRequest) (*servingpb.PutResponse, error)
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.