Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type RootConfigRepoMetadata ¶ added in v0.2.1
type RootConfigRepoMetadata struct { // This version refers to the version of the metadata. Version string `json:"version,omitempty" yaml:"version,omitempty"` Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"` ProtoDirectory string `json:"protoDir,omitempty" yaml:"protoDir,omitempty"` UseExternalTypes bool `json:"externalTypes,omitempty" yaml:"externalTypes,omitempty"` }
type SerializableTypes ¶ added in v0.5.1
type SerializableTypes struct { Types *protoregistry.Types FileDescriptorSet *descriptorpb.FileDescriptorSet }
func BuildDynamicTypeRegistryFromBufImage ¶ added in v0.5.1
func BuildDynamicTypeRegistryFromBufImage(image []byte) (*SerializableTypes, error)
func RegisterDynamicTypes ¶ added in v0.5.1
func RegisterDynamicTypes(files *protoregistry.Files) (*SerializableTypes, error)
func (*SerializableTypes) AddFileDescriptor ¶ added in v0.5.1
func (st *SerializableTypes) AddFileDescriptor(fd protoreflect.FileDescriptor, checkNotExists bool) error
type Store ¶
type Store interface { Evaluate(key string, namespace string, lekkoContext map[string]interface{}, dest proto.Message) error EvaluateAny(key string, namespace string, lekkoContext map[string]interface{}) (protoreflect.ProtoMessage, error) Close(ctx context.Context) error }
func NewBackendStore ¶
func NewBackendStore( ctx context.Context, apiKey, url, ownerName, repoName string, client *http.Client, updateInterval time.Duration, serverPort int32, sdkVersion string, ) (Store, error)
Constructs an in-memory store that fetches configs from lekko's backend.
func NewGitStore ¶ added in v0.2.1
func NewGitStore( ctx context.Context, apiKey, url, ownerName, repoName, path string, client *http.Client, port int32, sdkVersion string, ) (Store, error)
Constructs an in-memory store that fetches configs from a local git repo at the given path. If api key is empty, the store runs in local (offline) mode, and does not communicate with Lekko.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.