gocowvalue

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

README

go-copyonwrite-loader

A simple tiny config loader by using copy-on-write idea

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Op

type Op interface {
	Type() string
	Context() interface{}
}

type Reloader

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

func New

func New(v Value, freshFreq int) *Reloader

func (*Reloader) Accept

func (r *Reloader) Accept(op Op) error

func (*Reloader) Err

func (r *Reloader) Err() <-chan error

func (*Reloader) Reload

func (r *Reloader) Reload() Value

func (*Reloader) Start

func (r *Reloader) Start()

type Value

type Value interface {
	Copy() Value
	Apply(ops []Op) error
}

Jump to

Keyboard shortcuts

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