grpc_service

package
v0.0.0-...-9c9b480 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAsStructpb

func FormatAsStructpb(evCtx of.EvaluationContext) (*structpb.Struct, error)

func ParseError

func ParseError(err error) (*schemaV1.ErrorResponse, bool)

Types

type GRPCClient

type GRPCClient struct {
	GRPCServiceConfiguration *GRPCServiceConfiguration
	// contains filtered or unexported fields
}

func (*GRPCClient) Connect

func (s *GRPCClient) Connect()

func (*GRPCClient) GetInstance

func (s *GRPCClient) GetInstance() schemaV1.ServiceClient

type GRPCService

type GRPCService struct {
	Client IGRPCClient
}

func NewGRPCService

func NewGRPCService(opts ...GRPCServiceOption) *GRPCService

func (*GRPCService) ResolveBoolean

func (s *GRPCService) ResolveBoolean(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveBooleanResponse, error)

func (*GRPCService) ResolveNumber

func (s *GRPCService) ResolveNumber(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveNumberResponse, error)

func (*GRPCService) ResolveObject

func (s *GRPCService) ResolveObject(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveObjectResponse, error)

func (*GRPCService) ResolveString

func (s *GRPCService) ResolveString(flagKey string, context of.EvaluationContext, options ...service.IServiceOption) (*schemaV1.ResolveStringResponse, error)

type GRPCServiceConfiguration

type GRPCServiceConfiguration struct {
	Port int32
}

type GRPCServiceOption

type GRPCServiceOption func(*GRPCServiceConfiguration)

func WithPort

func WithPort(port int32) GRPCServiceOption

type IGRPCClient

type IGRPCClient interface {
	GetInstance() schemaV1.ServiceClient
}

Directories

Path Synopsis
tests

Jump to

Keyboard shortcuts

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