Go-kit example: support services without unary calls

This commit is contained in:
Manfred Touron
2016-12-26 16:20:46 +01:00
parent cdb9580565
commit 877e93aa7c
3 changed files with 9 additions and 1 deletions

View File

@@ -14,6 +14,11 @@ import (
endpoints "{{cat .GoPWD "/" .DestinationDir | nospace | clean}}/endpoints"
)
var _ = log.Printf
var _ = gokit_endpoint.Chain
var _ = httptransport.NewClient
{{range .Service.Method}}
{{if and (not .ServerStreaming) (not .ClientStreaming)}}
func Make{{.Name}}Handler(ctx context.Context, svc pb.{{$file.Package | title}}ServiceServer, endpoint gokit_endpoint.Endpoint) *httptransport.Server {