adapter

package
v1.16.26-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 14 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 {
	// Init will init for given id
	Init(ctx context.Context, id string) error
	// Notify will send data log events for particaular execution id
	Notify(ctx context.Context, id string, event events.Log) error
	// Stop will stop listening subscriber from sending data
	Stop(ctx context.Context, 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 {
	// contains filtered or unexported fields
}

func NewCloudAdapter added in v1.16.29

func NewCloudAdapter(grpcConn pb.CloudLogsServiceClient, agentApiKey string) *CloudAdapter

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

func (*CloudAdapter) Init added in v1.16.29

func (s *CloudAdapter) Init(ctx context.Context, id string) error

func (*CloudAdapter) Name

func (s *CloudAdapter) Name() string

func (*CloudAdapter) Notify

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

func (*CloudAdapter) Stop

func (s *CloudAdapter) Stop(ctx context.Context, 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) Init added in v1.16.29

func (s *DebugAdapter) Init(ctx context.Context, id string) error

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(ctx context.Context, id string, e events.Log) error

func (*DebugAdapter) Stop added in v1.16.26

func (s *DebugAdapter) Stop(ctx context.Context, id string) error

type ErrChunckTooBig added in v1.16.29

type ErrChunckTooBig struct {
	Length int
}

func (ErrChunckTooBig) Error added in v1.16.29

func (e ErrChunckTooBig) 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 ErrMinioAdapterDisconnected added in v1.16.29

type ErrMinioAdapterDisconnected struct {
}

func (ErrMinioAdapterDisconnected) Error added in v1.16.29

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)

NewMinioAdapter creates new MinioAdapter 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) Init added in v1.16.29

func (s *MinioAdapter) Init(ctx context.Context, id string) error

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(ctx context.Context, id string, e events.Log) error

func (*MinioAdapter) Stop added in v1.16.26

func (s *MinioAdapter) Stop(ctx context.Context, id string) error

func (*MinioAdapter) UpdateBuffInfo added in v1.16.26

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

Jump to

Keyboard shortcuts

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