service

package
v0.0.0-...-f990e35 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsServiceNotReadyError

func IsServiceNotReadyError(err error) bool

IsServiceNotReadyError evaluates if the given error is ServiceNotReadyError

Types

type ExternalCmdService

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

func CreateExternalCmdService

func CreateExternalCmdService(service *S3DataWatcherService) (*ExternalCmdService, error)

CreateExternalCmdService creates a ExternalCmd service object

func (*ExternalCmdService) Release

func (externalCmdService *ExternalCmdService) Release()

Release releases all resources

func (*ExternalCmdService) S3EventHandler

func (externalCmdService *ExternalCmdService) S3EventHandler(msg []byte)

type Filter

type Filter struct {
	Events  []string `yaml:"events,omitempty"`
	Buckets []string `yaml:"buckets,omitempty"`
	Objects []string `yaml:"objects,omitempty"`
}

type Job

type Job struct {
	Command string `yaml:"command"`
	Filter  Filter `yaml:"filter,omitempty"`
}

type Jobs

type Jobs struct {
	Jobs []Job `yaml:"jobs"`
}

type MinIOS3Event

type MinIOS3Event struct {
	EventName string                 `json:"EventName"`
	Key       string                 `json:"Key"`
	Records   []events.S3EventRecord `json:"Records"`
}

MinIOS3Event which wrap an array of S3EventRecord

type NatsService

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

func CreateNatsService

func CreateNatsService(service *S3DataWatcherService, config *commons.NatsConfig, hander S3EventHandler) (*NatsService, error)

CreateNatsService creates a Nats service object and connects to Nats

func (*NatsService) Release

func (natsService *NatsService) Release()

Release releases all resources, disconnecting from Nats

type S3DataWatcherService

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

S3DataWatcherService is a service object

func NewService

func NewService(config *commons.Config) (*S3DataWatcherService, error)

NewService creates a new Service

func (*S3DataWatcherService) Release

func (svc *S3DataWatcherService) Release()

Release releases the service

type S3EventHandler

type S3EventHandler func([]byte)

type ServiceNotReadyError

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

ServiceNotReadyError ...

func NewServiceNotReadyError

func NewServiceNotReadyError(message string) *ServiceNotReadyError

NewServiceNotReadyError creates ServiceNotReadyError struct

func NewServiceNotReadyErrorf

func NewServiceNotReadyErrorf(format string, v ...interface{}) *ServiceNotReadyError

NewServiceNotReadyErrorf creates ServiceNotReadyError struct

func (*ServiceNotReadyError) Error

func (e *ServiceNotReadyError) Error() string

Jump to

Keyboard shortcuts

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