weatherarchive

package
v0.0.0-...-d8ac9bd Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchiveFileName

func ArchiveFileName(dir, name string, t time.Time) string

Types

type Archiver

type Archiver struct {
	StoreDir    *string        `kernel:"flag,archive-dir,Archive directory"`
	LogMessages *bool          `kernel:"flag,archive-log,Dump messages to stdout"`
	Publish     *bool          `kernel:"flag,archive-publish,Publish to broker"`
	QueueName   *string        `kernel:"flag,archive-queue,Queue to consume from broker"`
	Broker      *Broker        `kernel:"inject"`
	Worker      task.Queue     `kernel:"worker"`
	Daemon      *kernel.Daemon `kernel:"inject"`
	// contains filtered or unexported fields
}

Archiver is a generic service which can accept raw data from Ingress or RabbitMQ and archive them into either log files, the console or post to RabbitMQ for remote archiving.

Note: When used with RabbitMQ, you can either publish to or consume from but not both.

func (*Archiver) Archive

func (s *Archiver) Archive(ctx context.Context) error

func (*Archiver) PostInit

func (s *Archiver) PostInit() error

func (*Archiver) Start

func (s *Archiver) Start() error

type Broker

type Broker struct {
	Broker   *string    `kernel:"flag,archive-broker,Send archives to rabbitmq"`
	Exchange *string    `kernel:"flag,archive-exchange,Exchange to use,amq.topic"`
	Amqp     amqp2.Pool `kernel:"inject"`
	// contains filtered or unexported fields
}

func (*Broker) Consume

func (s *Broker) Consume(queue *amqp2.Queue, tag string, task amqp2.Task) error

func (*Broker) ConsumeKeys

func (s *Broker) ConsumeKeys(queue *amqp2.Queue, tag string, task amqp2.Task, keys ...string) error

func (*Broker) IsActive

func (s *Broker) IsActive() bool

func (*Broker) Publish

func (s *Broker) Publish(key string, msg []byte) error

func (*Broker) RoutingKey

func (s *Broker) RoutingKey(name string) string

func (*Broker) Start

func (s *Broker) Start() error

func (*Broker) Stop

func (s *Broker) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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