Documentation ¶
Index ¶
- type GRPCService
- func (s *GRPCService) HandleEvaluationError(err error, reason string) error
- func (s *GRPCService) ResolveBoolean(ctx context.Context, req *gen.ResolveBooleanRequest) (*gen.ResolveBooleanResponse, error)
- func (s *GRPCService) ResolveFloat(ctx context.Context, req *gen.ResolveFloatRequest) (*gen.ResolveFloatResponse, error)
- func (s *GRPCService) ResolveInt(ctx context.Context, req *gen.ResolveIntRequest) (*gen.ResolveIntResponse, error)
- func (s *GRPCService) ResolveObject(ctx context.Context, req *gen.ResolveObjectRequest) (*gen.ResolveObjectResponse, error)
- func (s *GRPCService) ResolveString(ctx context.Context, req *gen.ResolveStringRequest) (*gen.ResolveStringResponse, error)
- func (s *GRPCService) Serve(ctx context.Context, eval eval.IEvaluator) error
- type GRPCServiceConfiguration
- type HTTPService
- func (s HTTPService) HTTPErrorHandler(ctx context.Context, m *runtime.ServeMux, ma runtime.Marshaler, ...)
- func (s *HTTPService) Serve(ctx context.Context, eval eval.IEvaluator) error
- func (s *HTTPService) ServeHTTP(mux *runtime.ServeMux) *http.Server
- func (s *HTTPService) ServerGRPC(mux *runtime.ServeMux) *grpc.Server
- type HTTPServiceConfiguration
- type IService
- type IServiceConfiguration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPCService ¶ added in v0.0.4
type GRPCService struct { GRPCServiceConfiguration *GRPCServiceConfiguration Eval eval.IEvaluator gen.UnimplementedServiceServer Logger *log.Entry }
func (*GRPCService) HandleEvaluationError ¶ added in v0.0.5
func (s *GRPCService) HandleEvaluationError(err error, reason string) error
func (*GRPCService) ResolveBoolean ¶ added in v0.0.4
func (s *GRPCService) ResolveBoolean( ctx context.Context, req *gen.ResolveBooleanRequest, ) (*gen.ResolveBooleanResponse, error)
TODO: might be able to simplify some of this with generics.
func (*GRPCService) ResolveFloat ¶ added in v0.0.6
func (s *GRPCService) ResolveFloat( ctx context.Context, req *gen.ResolveFloatRequest, ) (*gen.ResolveFloatResponse, error)
func (*GRPCService) ResolveInt ¶ added in v0.0.6
func (s *GRPCService) ResolveInt( ctx context.Context, req *gen.ResolveIntRequest, ) (*gen.ResolveIntResponse, error)
func (*GRPCService) ResolveObject ¶ added in v0.0.4
func (s *GRPCService) ResolveObject( ctx context.Context, req *gen.ResolveObjectRequest, ) (*gen.ResolveObjectResponse, error)
func (*GRPCService) ResolveString ¶ added in v0.0.4
func (s *GRPCService) ResolveString( ctx context.Context, req *gen.ResolveStringRequest, ) (*gen.ResolveStringResponse, error)
func (*GRPCService) Serve ¶ added in v0.0.4
func (s *GRPCService) Serve(ctx context.Context, eval eval.IEvaluator) error
Serve allows for the use of GRPC only without HTTP, where as HTTP service enables both GRPC and HTTP
type GRPCServiceConfiguration ¶ added in v0.0.4
type HTTPService ¶ added in v0.0.3
type HTTPService struct { HTTPServiceConfiguration *HTTPServiceConfiguration GRPCService *GRPCService Logger *log.Entry }
func (HTTPService) HTTPErrorHandler ¶ added in v0.0.4
func (*HTTPService) Serve ¶ added in v0.0.3
func (s *HTTPService) Serve(ctx context.Context, eval eval.IEvaluator) error
func (*HTTPService) ServeHTTP ¶ added in v0.0.6
func (s *HTTPService) ServeHTTP(mux *runtime.ServeMux) *http.Server
func (*HTTPService) ServerGRPC ¶ added in v0.0.6
func (s *HTTPService) ServerGRPC(mux *runtime.ServeMux) *grpc.Server
type HTTPServiceConfiguration ¶ added in v0.0.3
type IService ¶
type IService interface {
Serve(ctx context.Context, eval eval.IEvaluator) error
}
IService implementations define handlers for a particular transport, which call the IEvaluator implementation.
type IServiceConfiguration ¶
type IServiceConfiguration interface{}
Click to show internal directories.
Click to hide internal directories.