Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultEventTypeCreate = iota DefaultEventTypeModify = 1 DefaultEventTypeDelete = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultEventType ¶ added in v0.0.5
type DefaultEventType int32
type Event ¶
type Event[T any] struct { EventType T }
Event is a struct that represents a single event. It is a generic struct that can be cast to a more specific struct.
type FilePathSync ¶
type HTTPSync ¶ added in v0.0.3
type HTTPSync struct { URI string Client *http.Client BearerToken string LastBodySHA string Logger *log.Entry }
type INotify ¶
type INotify interface {
GetEvent() Event[DefaultEventType]
}
type ISync ¶
type ISync interface { Fetch(ctx context.Context) (string, error) Notify(ctx context.Context, c 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[DefaultEventType]
}
func (*Notifier) GetEvent ¶
func (w *Notifier) GetEvent() Event[DefaultEventType]
Click to show internal directories.
Click to hide internal directories.