yaml

package
v0.3.0-20260820034428-... Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package yaml provides a YAML-file-backed implementation of queueconfig.Store. The file is read once at construction time and held in memory; the file is not watched for changes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store is a queueconfig.Store backed by an in-memory snapshot of a YAML file. Construct via NewStore. Safe for concurrent reads.

func NewStore

func NewStore(path string) (Store, error)

NewStore reads queue configurations from the YAML file at path and returns a Store. If the file omits the top-level "queues" key, it is treated as an empty queue list. Returns an error if the file is unreadable, malformed, contains a queue with an empty name, or contains duplicate queue names.

func (Store) Get

func (s Store) Get(_ context.Context, name string) (entity.QueueConfig, error)

Get returns the configuration for the named queue, or queueconfig.ErrNotFound.

func (Store) List

func (s Store) List(_ context.Context) ([]entity.QueueConfig, error)

List returns a copy of all configured queues in file order.

Jump to

Keyboard shortcuts

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