adapter

package
v1.16.25-beta001 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	// Notify will send data log events for particaular execution id
	Notify(id string, event events.Log) error
	// Stop will stop listening subscriber from sending data
	Stop(id string) error
	// Name subscriber name
	Name() string
}

Adapter will listen to log chunks, and handle them based on log id (execution Id)

type BufferInfo added in v1.16.25

type BufferInfo struct {
	Buffer *bytes.Buffer
	Part   int
}

type CloudAdapter

type CloudAdapter struct {
	Bucket string
}

func NewCloudConsumer

func NewCloudConsumer() *CloudAdapter

NewCloudConsumer creates new CloudSubscriber which will send data to local MinIO bucket

func (*CloudAdapter) Name

func (s *CloudAdapter) Name() string

func (*CloudAdapter) Notify

func (s *CloudAdapter) Notify(id string, e events.Log) error

func (*CloudAdapter) Stop

func (s *CloudAdapter) Stop(id string) error

type DebugAdapter added in v1.16.26

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

func NewDebugAdapter added in v1.16.26

func NewDebugAdapter() *DebugAdapter

NewDebugAdapter creates new DebugAdapter which will write logs to stdout

func (*DebugAdapter) Name added in v1.16.26

func (s *DebugAdapter) Name() string

func (*DebugAdapter) Notify added in v1.16.26

func (s *DebugAdapter) Notify(id string, e events.Log) error

func (*DebugAdapter) Stop added in v1.16.26

func (s *DebugAdapter) Stop(id string) error

type ErrChucnkTooBig added in v1.16.25

type ErrChucnkTooBig struct {
	Length int
}

func (ErrChucnkTooBig) Error added in v1.16.25

func (e ErrChucnkTooBig) Error() string

type ErrIdNotFound added in v1.16.25

type ErrIdNotFound struct {
	Id string
}

func (ErrIdNotFound) Error added in v1.16.25

func (e ErrIdNotFound) Error() string

type ErrMinioConsumerDisconnected added in v1.16.25

type ErrMinioConsumerDisconnected struct {
}

func (ErrMinioConsumerDisconnected) Error added in v1.16.25

type MinioAdapter added in v1.16.26

type MinioAdapter struct {
	Log *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewMinioAdapter added in v1.16.26

func NewMinioAdapter(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, ssl, skipVerify bool, certFile, keyFile, caFile string) (*MinioAdapter, error)

MinioConsumer creates new MinioSubscriber which will send data to local MinIO bucket

func (*MinioAdapter) DeleteBuffInfo added in v1.16.26

func (s *MinioAdapter) DeleteBuffInfo(id string)

func (*MinioAdapter) GetBuffInfo added in v1.16.26

func (s *MinioAdapter) GetBuffInfo(id string) (BufferInfo, bool)

func (*MinioAdapter) Name added in v1.16.26

func (s *MinioAdapter) Name() string

func (*MinioAdapter) Notify added in v1.16.26

func (s *MinioAdapter) Notify(id string, e events.Log) error

func (*MinioAdapter) Stop added in v1.16.26

func (s *MinioAdapter) Stop(id string) error

func (*MinioAdapter) UpdateBuffInfo added in v1.16.26

func (s *MinioAdapter) UpdateBuffInfo(id string, buffInfo BufferInfo)

type S3Adapter

type S3Adapter struct {
	Bucket string
}

func NewS3Adapter

func NewS3Adapter() *S3Adapter

NewS3Adapter creates new S3Subscriber which will send data to local MinIO bucket

func (*S3Adapter) Name

func (s *S3Adapter) Name() string

func (*S3Adapter) Notify

func (s *S3Adapter) Notify(id string, e events.Log) error

func (*S3Adapter) Stop

func (s *S3Adapter) Stop(id string) error

Jump to

Keyboard shortcuts

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