transport

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Service)

Option is a service option.

func WithAddress

func WithAddress(address string) Option

WithAddress sets the address for the remote Flipt gRPC API.

func WithCertificatePath

func WithCertificatePath(certificatePath string) Option

WithCertificatePath sets the certificate path for the service.

func WithClientTokenProvider

func WithClientTokenProvider(tokenProvider sdk.ClientTokenProvider) Option

WithClientTokenProvider sets the token provider for auth to support client auth needs.

func WithUnaryClientInterceptor

func WithUnaryClientInterceptor(unaryInterceptors ...grpc.UnaryClientInterceptor) Option

WithUnaryClientInterceptor sets the provided unary client interceptors to be applied to the established gRPC client connection.

type Service

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

Service is a Transport service.

func New

func New(opts ...Option) *Service

New creates a new Transport service.

func (*Service) Boolean

func (s *Service) Boolean(ctx context.Context, namespaceKey, flagKey string, evalCtx map[string]interface{}) (*evaluation.BooleanEvaluationResponse, error)

Boolean evaluates a boolean type flag with the given context and namespace/flag key pair.

func (*Service) Evaluate

func (s *Service) Evaluate(ctx context.Context, namespaceKey, flagKey string, evalCtx map[string]interface{}) (*evaluation.VariantEvaluationResponse, error)

Evaluate evaluates a variant type flag with the given context and namespace/flag key pair.

func (*Service) GetFlag

func (s *Service) GetFlag(ctx context.Context, namespaceKey, flagKey string) (*flipt.Flag, error)

GetFlag returns a flag if it exists for the given namespace/flag key pair.

Jump to

Keyboard shortcuts

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