Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
DROP = fmt.Sprintf("%U__DROP__", '\\') // U+005C__DROP__
)
Functions ¶
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 Mapper ¶
type Mapper interface { // Map is the function to process each coming message. Map(ctx context.Context, keys []string, datum Datum) Messages }
Mapper is the interface of map function implementation.
type MapperFunc ¶
MapperFunc is a utility type used to convert a map function to a Mapper.
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
Message is used to wrap the data return by Map functions
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 { mappb.UnimplementedMapServer Mapper Mapper // contains filtered or unexported fields }
Service implements the proto gen server interface and contains the map operation handler.