file

package
v0.3.0-20261015220420-... Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package file provides a YAML-file-backed implementation of queuepause.Store. The file is re-read on every Get, so editing it pauses or unpauses a queue without a restart. The file lists the queues that have pause switches set:

queues:
  - name: my-queue
    reject_lands: true
    freeze_processing: false
    reason: repo freeze until 17:00

A queue with no entry is not paused. The file must exist and parse when the Store is constructed, so a mistyped path fails at startup. A later read or parse failure is returned from Get as an error, never treated as unpaused.

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 queuepause.Store backed by a YAML file that is re-read on every Get. Safe for concurrent use.

func NewStore

func NewStore(path string) (Store, error)

NewStore returns a Store reading the YAML file at path. Returns an error if the file is unreadable or invalid, so that a misconfigured path is caught at startup.

func (Store) Get

func (s Store) Get(_ context.Context, queue string) (entity.QueuePause, error)

Get re-reads the file and returns the pause state of the named queue, or the zero state if the queue has no entry.

Jump to

Keyboard shortcuts

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