Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DROP = fmt.Sprintf("%U__DROP__", '\\') // U+005C__DROP__
Functions ¶
func NewServer ¶
func NewServer(m SourceTransformer, inputOptions ...Option) numaflow.Server
NewServer creates a new SourceTransformer server.
Types ¶
type Datum ¶
type Datum interface { // Value returns the payload of the message. Value() []byte // EventTime returns the event time of the message. EventTime() time.Time // Watermark returns the watermark of the message. Watermark() time.Time // Headers returns the headers of the message. Headers() map[string]string }
Datum contains methods to get the payload information.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is used to wrap the data return by SourceTransformer functions. Compared with Message of other UDFs, source transformer Message contains one more field, the event time, usually extracted from the payload.
func MessageToDrop ¶
MessageToDrop creates a Message to be dropped with eventTime. eventTime is required because, even though a message is dropped, it is still considered as being processed, hence the watermark should be updated accordingly using the provided event time.
func NewMessage ¶
NewMessage creates a Message with eventTime and value
type Messages ¶
type Messages []Message
func MessagesBuilder ¶
func MessagesBuilder() Messages
MessagesBuilder returns an empty instance of Messages
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 purposes.
type Service ¶
type Service struct { v1.UnimplementedSourceTransformServer Transformer SourceTransformer // contains filtered or unexported fields }
Service implements the proto gen server interface and contains the transformer operation handler.
func (*Service) SourceTransformFn ¶
func (fs *Service) SourceTransformFn(stream v1.SourceTransform_SourceTransformFnServer) error
SourceTransformFn applies a function to each request element. In addition to map function, SourceTransformFn also supports assigning a new event time to response. SourceTransformFn can be used only at source vertex by source data transformer.
type SourceTransformFunc ¶
SourceTransformFunc is a utility type used to convert a function to a SourceTransformer.