sync

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EEventTypeCreate = iota
	EEventTypeModify = 1
	EEventTypeDelete = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EEventType added in v0.0.3

type EEventType int32

type Event

type Event struct {
	EventType EEventType
}

type FilePathSync

type FilePathSync struct {
	URI string
}

func (*FilePathSync) Fetch

func (fs *FilePathSync) Fetch() (string, error)

func (*FilePathSync) Notify

func (fs *FilePathSync) Notify(w chan<- INotify)

type HTTPSync added in v0.0.3

type HTTPSync struct {
	URI         string
	Client      *http.Client
	BearerToken string
	LastBodySHA string
}

func (*HTTPSync) Fetch added in v0.0.3

func (fs *HTTPSync) Fetch() (string, error)

func (*HTTPSync) Notify added in v0.0.3

func (fs *HTTPSync) Notify(w chan<- INotify)

type INotify

type INotify interface {
	GetEvent() Event
}

type ISync

type ISync interface {
	Fetch() (string, error)
	Notify(chan<- INotify)
}

ISync implementations watch for changes in the flag source (HTTP backend, local file, s3 bucket), and fetch the latest values.

type Notifier

type Notifier struct {
	Event Event
}

func (*Notifier) GetEvent

func (w *Notifier) GetEvent() Event

Jump to

Keyboard shortcuts

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