bblfsh_mockups

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrepareGRPCServer

func PrepareGRPCServer(o Options) (func(), error)

PrepareGRPCServer runs GRPC server with a mocked service

Types

type Options

type Options struct {
	OptsV2 OptsV2
}

Options represents options of the mocked service

type OptsV1

type OptsV1 struct{}

OptsV1 is a set of ServiceV1 mockup options

type OptsV2

type OptsV2 struct {
	ParseResponseLag time.Duration
	ParseResponse    *v2.ParseResponse
	ParseResponseErr error
}

OptsV2 is a set of ServiceV2 mockup options

type ServiceV1

type ServiceV1 struct{ Opts OptsV1 }

ServiceV1 is bblfsh grpc server v2 mockup

type ServiceV2

type ServiceV2 struct{ Opts OptsV2 }

ServiceV2 is bblfsh grpc server v2 mockup

func NewServiceV2

func NewServiceV2(opts OptsV2) *ServiceV2

NewServiceV2 is ServiceV2 constructor

func (*ServiceV2) Parse

func (v *ServiceV2) Parse(ctx context.Context, p *v2.ParseRequest) (*v2.ParseResponse, error)

func (*ServiceV2) ServerVersion

Jump to

Keyboard shortcuts

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