Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Applier ¶
type Applier interface {
Apply(ctx context.Context, message *isb.ReadMessage) ([]*isb.Message, error)
}
Applier applies the HTTPBasedUDF on the read message and gives back a new message. Any UserError will be retried here, while InternalErr can be returned and could be retried by the callee.
type ApplyUDFErr ¶
type ApplyUDFErr struct { UserUDFErr bool Message string InternalErr }
ApplyUDFErr represents any UDF related error
func (ApplyUDFErr) Error ¶
func (e ApplyUDFErr) Error() string
func (ApplyUDFErr) IsInternalErr ¶
func (e ApplyUDFErr) IsInternalErr() bool
IsInternalErr is true if this is a platform issue. This is a blocking error.
func (ApplyUDFErr) IsUserUDFErr ¶
func (e ApplyUDFErr) IsUserUDFErr() bool
IsUserUDFErr is true if the problem is due to the user code in the UDF.
type InternalErr ¶
InternalErr represents errors internal to the platform
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option to apply different options
func WithHTTPClientTimeout ¶
WithHTTPClientTimeout sets timeout for the HTTP Client
type UDSHTTPBasedUDF ¶
type UDSHTTPBasedUDF struct {
// contains filtered or unexported fields
}
UDSHTTPBasedUDF applies user defined function over HTTP (over Unix Domain Socket) client/server where server is the UDF.
func NewUDSHTTPBasedUDF ¶
func NewUDSHTTPBasedUDF(socketPath string, opts ...Option) *UDSHTTPBasedUDF
NewUDSHTTPBasedUDF returns UDSHTTPBasedUDF. Parameter - socketPath, Unix Domain Socket path
func (*UDSHTTPBasedUDF) Apply ¶
func (u *UDSHTTPBasedUDF) Apply(ctx context.Context, readMessage *isb.ReadMessage) ([]*isb.Message, error)
Apply applies the user defined function.
func (*UDSHTTPBasedUDF) WaitUntilReady ¶
func (u *UDSHTTPBasedUDF) WaitUntilReady(ctx context.Context) error
WaitUntilReady waits till the readyURL is available