Custom Retriever
To create a custom retriever you must have a struct
that implements the Retriever
interface.
type Retriever interface {
Retrieve(ctx context.Context) ([]byte, error)
}
The Retrieve
function is supposed to load the file and to return a []byte
of your flag configuration file.
You can check existing Retriever
(file,
s3, ...) to have an idea on how to do build your own.