Documentation ¶
Overview ¶
Package golang provides an interface to write UDF in golang which will be exposed over HTTP. It accepts a handler of the following definition
func(ctx context.Context, key, msg []byte) (messages Messages, err error)
which will be invoked for message. If error is returned, the HTTP StatusCode will be set to 500.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DROP = fmt.Sprintf("%U__DROP__", '\\') // U+005C__DROP__ ALL = fmt.Sprintf("%U__ALL__", '\\') // U+005C__ALL__ )
Functions ¶
Types ¶
type Message ¶
Message is used to wrap the data return by UDF functions
func MessageToAll ¶
MessageToAll creates a Message that will forward to all
type Messages ¶
type Messages []Message
func MessagesBuilder ¶
func MessagesBuilder() Messages
MessagesBuilder returns an empty instance of Messages
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option to apply different options
func WithDrainTimeout ¶
WithDrainTimeout sets a max drain timeout time. It is the maximum time we will wait for the connection to drain out once we have initiated the shutdown sequence. Default is 1 minute.
Click to show internal directories.
Click to hide internal directories.