udsink

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplyUDSinkErr

type ApplyUDSinkErr struct {
	UserUDSinkErr bool
	Message       string
	InternalErr
}

ApplyUDSinkErr represents any UDSink related error

func (ApplyUDSinkErr) Error

func (e ApplyUDSinkErr) Error() string

func (ApplyUDSinkErr) IsInternalErr

func (e ApplyUDSinkErr) IsInternalErr() bool

IsInternalErr is true if this is a platform issue. This is a blocking error.

func (ApplyUDSinkErr) IsUserUDSinkErr

func (e ApplyUDSinkErr) IsUserUDSinkErr() bool

IsUserUDSinkErr is true if the problem is due to the user code in the UDSink.

type InternalErr

type InternalErr struct {
	Flag        bool
	MainCarDown bool
}

InternalErr represents errors internal to the platform

type Option

type Option func(*UserDefinedSink) error

func WithLogger

func WithLogger(log *zap.SugaredLogger) Option

type SinkApplier added in v0.10.0

type SinkApplier interface {
	ApplySink(ctx context.Context, requests []*sinkpb.SinkRequest) []error
}

SinkApplier applies the sink on the read message and gives back a response. Any UserError will be retried here, while InternalErr can be returned and could be retried by the callee.

type UDSgRPCBasedUDSink added in v0.7.1

type UDSgRPCBasedUDSink struct {
	// contains filtered or unexported fields
}

UDSgRPCBasedUDSink applies user defined sink over gRPC (over Unix Domain Socket) client/server where server is the UDSink.

func NewUDSgRPCBasedUDSink added in v0.7.1

func NewUDSgRPCBasedUDSink(client sinkclient.Client) *UDSgRPCBasedUDSink

NewUDSgRPCBasedUDSink returns UDSgRPCBasedUDSink

func (*UDSgRPCBasedUDSink) ApplySink added in v0.10.0

func (u *UDSgRPCBasedUDSink) ApplySink(ctx context.Context, requests []*sinkpb.SinkRequest) []error

func (*UDSgRPCBasedUDSink) CloseConn added in v0.7.1

func (u *UDSgRPCBasedUDSink) CloseConn(ctx context.Context) error

CloseConn closes the gRPC client connection.

func (*UDSgRPCBasedUDSink) IsHealthy added in v0.7.1

func (u *UDSgRPCBasedUDSink) IsHealthy(ctx context.Context) error

IsHealthy checks if the udsink is healthy.

func (*UDSgRPCBasedUDSink) WaitUntilReady added in v0.7.1

func (u *UDSgRPCBasedUDSink) WaitUntilReady(ctx context.Context) error

WaitUntilReady waits until the udsink is connected.

type UserDefinedSink added in v0.6.0

type UserDefinedSink struct {
	// contains filtered or unexported fields
}

func NewUserDefinedSink

func NewUserDefinedSink(vertexInstance *dfv1.VertexInstance,
	fromBuffer isb.BufferReader,
	fetchWatermark fetch.Fetcher,
	publishWatermark publish.Publisher,
	idleManager wmb.IdleManager,
	udsink SinkApplier,
	opts ...Option) (*UserDefinedSink, error)

NewUserDefinedSink returns genericSink type.

func (*UserDefinedSink) Close added in v0.6.0

func (s *UserDefinedSink) Close() error

func (*UserDefinedSink) ForceStop added in v0.6.0

func (s *UserDefinedSink) ForceStop()

func (*UserDefinedSink) GetName added in v0.6.0

func (s *UserDefinedSink) GetName() string

func (*UserDefinedSink) GetPartitionIdx added in v0.9.0

func (s *UserDefinedSink) GetPartitionIdx() int32

GetPartitionIdx returns the partition index. for sink it is always 0.

func (*UserDefinedSink) IsFull added in v0.6.0

func (s *UserDefinedSink) IsFull() bool

func (*UserDefinedSink) Start added in v0.6.0

func (s *UserDefinedSink) Start() <-chan struct{}

func (*UserDefinedSink) Stop added in v0.6.0

func (s *UserDefinedSink) Stop()

func (*UserDefinedSink) Write added in v0.6.0

func (s *UserDefinedSink) Write(ctx context.Context, messages []isb.Message) ([]isb.Offset, []error)

Write writes to the UDSink container.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL