rpc

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonCached      = "CACHED"
	ClientNotReadyMsg = "client did not yet finish the initialization"
)
View Source
const ConnectionError = "connection not made"

Variables

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Port            uint16
	Host            string
	CertificatePath string
	SocketPath      string
	TLSEnabled      bool
	OtelInterceptor bool
}

type Service

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

Service handles the client side interface for the flagd server

func NewService

func NewService(cfg Configuration, cache *cache.Service, logger logr.Logger, retries int) *Service

func (*Service) EventChannel

func (s *Service) EventChannel() <-chan of.Event

func (*Service) Init

func (s *Service) Init() error

func (*Service) ResolveBoolean

func (s *Service) ResolveBoolean(ctx context.Context, key string, defaultValue bool,
	evalCtx map[string]interface{}) of.BoolResolutionDetail

ResolveBoolean handles the flag evaluation response from the flagd ResolveBoolean rpc

func (*Service) ResolveFloat

func (s *Service) ResolveFloat(ctx context.Context, key string, defaultValue float64,
	evalCtx map[string]interface{}) of.FloatResolutionDetail

ResolveFloat handles the flag evaluation response from the flagd interface ResolveFloat rpc

func (*Service) ResolveInt

func (s *Service) ResolveInt(ctx context.Context, key string, defaultValue int64,
	evalCtx map[string]interface{}) of.IntResolutionDetail

ResolveInt handles the flag evaluation response from the flagd interface ResolveNumber rpc

func (*Service) ResolveObject

func (s *Service) ResolveObject(ctx context.Context, key string, defaultValue interface{},
	evalCtx map[string]interface{}) of.InterfaceResolutionDetail

ResolveObject handles the flag evaluation response from the flagd interface ResolveObject rpc

func (*Service) ResolveString

func (s *Service) ResolveString(ctx context.Context, key string, defaultValue string,
	evalCtx map[string]interface{}) of.StringResolutionDetail

ResolveString handles the flag evaluation response from the flagd interface ResolveString rpc

func (*Service) Shutdown

func (s *Service) Shutdown()

Jump to

Keyboard shortcuts

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