service

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleEvaluationError added in v0.0.4

func HandleEvaluationError(err error, reason string) error

Types

type GRPCService added in v0.0.4

type GRPCService struct {
	GRPCServiceConfiguration *GRPCServiceConfiguration

	gen.UnimplementedServiceServer
	// contains filtered or unexported fields
}

func (GRPCService) ResolveBoolean added in v0.0.4

TODO: might be able to simplify some of this with generics.

func (GRPCService) ResolveNumber added in v0.0.4

func (GRPCService) ResolveObject added in v0.0.4

func (GRPCService) ResolveString added in v0.0.4

func (GRPCService) Serve added in v0.0.4

func (s GRPCService) Serve(ctx context.Context, eval eval.IEvaluator) error

type GRPCServiceConfiguration added in v0.0.4

type GRPCServiceConfiguration struct {
	Port int32
}

type HTTPService added in v0.0.3

type HTTPService struct {
	HTTPServiceConfiguration *HTTPServiceConfiguration
	GRPCService              *GRPCService
}

func (HTTPService) HTTPErrorHandler added in v0.0.4

func (s HTTPService) HTTPErrorHandler(
	ctx context.Context,
	m *runtime.ServeMux,
	ma runtime.Marshaler,
	w http.ResponseWriter,
	r *http.Request,
	err error,
)

func (*HTTPService) Serve added in v0.0.3

func (s *HTTPService) Serve(ctx context.Context, eval eval.IEvaluator) error

type HTTPServiceConfiguration added in v0.0.3

type HTTPServiceConfiguration struct {
	Port int32
}

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{}

Jump to

Keyboard shortcuts

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