Documentation ¶
Index ¶
- func PrepareGRPCServer(o Options) (func(), error)
- type Options
- type OptsV1
- type OptsV2
- type ServiceV1
- type ServiceV2
- func (v *ServiceV2) Parse(ctx context.Context, p *v2.ParseRequest) (*v2.ParseResponse, error)
- func (v *ServiceV2) ServerVersion(context.Context, *v2.VersionRequest) (*v2.VersionResponse, error)
- func (v *ServiceV2) SupportedLanguages(context.Context, *v2.SupportedLanguagesRequest) (*v2.SupportedLanguagesResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrepareGRPCServer ¶
PrepareGRPCServer runs GRPC server with a mocked service
Types ¶
type Options ¶
type Options struct {
OptsV2 OptsV2
}
Options represents options of the mocked service
type OptsV2 ¶
type OptsV2 struct { ParseResponseLag time.Duration ParseResponse *v2.ParseResponse ParseResponseErr error }
OptsV2 is a set of ServiceV2 mockup options
type ServiceV2 ¶
type ServiceV2 struct{ Opts OptsV2 }
ServiceV2 is bblfsh grpc server v2 mockup
func (*ServiceV2) Parse ¶
func (v *ServiceV2) Parse(ctx context.Context, p *v2.ParseRequest) (*v2.ParseResponse, error)
func (*ServiceV2) ServerVersion ¶
func (v *ServiceV2) ServerVersion(context.Context, *v2.VersionRequest) (*v2.VersionResponse, error)
func (*ServiceV2) SupportedLanguages ¶
func (v *ServiceV2) SupportedLanguages(context.Context, *v2.SupportedLanguagesRequest) (*v2.SupportedLanguagesResponse, error)
Click to show internal directories.
Click to hide internal directories.