Moved to bidirectional RPC

pull/2342/head
John Welsh 9 years ago
parent b1fbc391ed
commit f70b1db6f9

@ -393,24 +393,29 @@ func (h *Client) logs(ctx context.Context, req *rls.GetReleaseLogsRequest, done
} }
rlc := rls.NewReleaseServiceClient(c) rlc := rls.NewReleaseServiceClient(c)
s, err := rlc.GetReleaseLogs(ctx, req) s, err := rlc.GetReleaseLogs(ctx)
fmt.Println("Got s: ", s, " err: ", err)
if err != nil { if err != nil {
return nil, err return nil, err
} }
s.Send(req)
fmt.Println("Sent req")
out := make(chan *rls.GetReleaseLogsResponse) out := make(chan *rls.GetReleaseLogsResponse)
go func() { go func() {
defer close(out) defer close(out)
defer c.Close() defer c.Close()
for { for {
fmt.Println("Waiting on recv")
rs, err := s.Recv() rs, err := s.Recv()
fmt.Println("Got rs: ", s, " err: ", err)
if err == io.EOF { if err == io.EOF {
return return
} }
if err != nil { if err != nil {
fmt.Println("gRPC error streaming logs: ", grpc.ErrorDesc(err)) fmt.Println()
return
} }
out <- rs out <- rs
//select { //select {

@ -600,7 +600,7 @@ type ReleaseServiceClient interface {
// GetReleaseContent retrieves the release content (chart + value) for the specified release. // GetReleaseContent retrieves the release content (chart + value) for the specified release.
GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error) GetReleaseContent(ctx context.Context, in *GetReleaseContentRequest, opts ...grpc.CallOption) (*GetReleaseContentResponse, error)
// GetReleaseLogs returns a stream of logging information from the release // GetReleaseLogs returns a stream of logging information from the release
GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) GetReleaseLogs(ctx context.Context, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error)
// UpdateRelease updates release content. // UpdateRelease updates release content.
UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error) UpdateRelease(ctx context.Context, in *UpdateReleaseRequest, opts ...grpc.CallOption) (*UpdateReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release. // InstallRelease requests installation of a chart as a new release.
@ -675,22 +675,17 @@ func (c *releaseServiceClient) GetReleaseContent(ctx context.Context, in *GetRel
return out, nil return out, nil
} }
func (c *releaseServiceClient) GetReleaseLogs(ctx context.Context, in *GetReleaseLogsRequest, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) { func (c *releaseServiceClient) GetReleaseLogs(ctx context.Context, opts ...grpc.CallOption) (ReleaseService_GetReleaseLogsClient, error) {
stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/GetReleaseLogs", opts...) stream, err := grpc.NewClientStream(ctx, &_ReleaseService_serviceDesc.Streams[1], c.cc, "/hapi.services.tiller.ReleaseService/GetReleaseLogs", opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
x := &releaseServiceGetReleaseLogsClient{stream} x := &releaseServiceGetReleaseLogsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil return x, nil
} }
type ReleaseService_GetReleaseLogsClient interface { type ReleaseService_GetReleaseLogsClient interface {
Send(*GetReleaseLogsRequest) error
Recv() (*GetReleaseLogsResponse, error) Recv() (*GetReleaseLogsResponse, error)
grpc.ClientStream grpc.ClientStream
} }
@ -699,6 +694,10 @@ type releaseServiceGetReleaseLogsClient struct {
grpc.ClientStream grpc.ClientStream
} }
func (x *releaseServiceGetReleaseLogsClient) Send(m *GetReleaseLogsRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *releaseServiceGetReleaseLogsClient) Recv() (*GetReleaseLogsResponse, error) { func (x *releaseServiceGetReleaseLogsClient) Recv() (*GetReleaseLogsResponse, error) {
m := new(GetReleaseLogsResponse) m := new(GetReleaseLogsResponse)
if err := x.ClientStream.RecvMsg(m); err != nil { if err := x.ClientStream.RecvMsg(m); err != nil {
@ -806,7 +805,7 @@ type ReleaseServiceServer interface {
// GetReleaseContent retrieves the release content (chart + value) for the specified release. // GetReleaseContent retrieves the release content (chart + value) for the specified release.
GetReleaseContent(context.Context, *GetReleaseContentRequest) (*GetReleaseContentResponse, error) GetReleaseContent(context.Context, *GetReleaseContentRequest) (*GetReleaseContentResponse, error)
// GetReleaseLogs returns a stream of logging information from the release // GetReleaseLogs returns a stream of logging information from the release
GetReleaseLogs(*GetReleaseLogsRequest, ReleaseService_GetReleaseLogsServer) error GetReleaseLogs(ReleaseService_GetReleaseLogsServer) error
// UpdateRelease updates release content. // UpdateRelease updates release content.
UpdateRelease(context.Context, *UpdateReleaseRequest) (*UpdateReleaseResponse, error) UpdateRelease(context.Context, *UpdateReleaseRequest) (*UpdateReleaseResponse, error)
// InstallRelease requests installation of a chart as a new release. // InstallRelease requests installation of a chart as a new release.
@ -885,15 +884,12 @@ func _ReleaseService_GetReleaseContent_Handler(srv interface{}, ctx context.Cont
} }
func _ReleaseService_GetReleaseLogs_Handler(srv interface{}, stream grpc.ServerStream) error { func _ReleaseService_GetReleaseLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetReleaseLogsRequest) return srv.(ReleaseServiceServer).GetReleaseLogs(&releaseServiceGetReleaseLogsServer{stream})
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(ReleaseServiceServer).GetReleaseLogs(m, &releaseServiceGetReleaseLogsServer{stream})
} }
type ReleaseService_GetReleaseLogsServer interface { type ReleaseService_GetReleaseLogsServer interface {
Send(*GetReleaseLogsResponse) error Send(*GetReleaseLogsResponse) error
Recv() (*GetReleaseLogsRequest, error)
grpc.ServerStream grpc.ServerStream
} }
@ -905,6 +901,14 @@ func (x *releaseServiceGetReleaseLogsServer) Send(m *GetReleaseLogsResponse) err
return x.ServerStream.SendMsg(m) return x.ServerStream.SendMsg(m)
} }
func (x *releaseServiceGetReleaseLogsServer) Recv() (*GetReleaseLogsRequest, error) {
m := new(GetReleaseLogsRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _ReleaseService_UpdateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _ReleaseService_UpdateRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateReleaseRequest) in := new(UpdateReleaseRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
@ -1081,6 +1085,7 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{
StreamName: "GetReleaseLogs", StreamName: "GetReleaseLogs",
Handler: _ReleaseService_GetReleaseLogs_Handler, Handler: _ReleaseService_GetReleaseLogs_Handler,
ServerStreams: true, ServerStreams: true,
ClientStreams: true,
}, },
{ {
StreamName: "RunReleaseTest", StreamName: "RunReleaseTest",
@ -1094,82 +1099,83 @@ var _ReleaseService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) } func init() { proto.RegisterFile("hapi/services/tiller.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 1229 bytes of a gzipped FileDescriptorProto // 1233 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x72, 0xdb, 0x44,
0x14, 0x8e, 0x2c, 0xc7, 0x3f, 0x27, 0x69, 0x48, 0xb7, 0xf9, 0x51, 0x35, 0xc0, 0x04, 0x75, 0xa0, 0x14, 0x8e, 0x2c, 0xc7, 0x3f, 0x27, 0x69, 0x70, 0xb7, 0x89, 0xa3, 0x6a, 0x80, 0x09, 0xea, 0x40,
0x6e, 0x4b, 0x1d, 0x30, 0x57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@ func (s *ReleaseServer) GetReleaseContent(c ctx.Context, req *services.GetReleas
return &services.GetReleaseContentResponse{Release: rel}, err return &services.GetReleaseContentResponse{Release: rel}, err
} }
func (s *ReleaseServer) GetReleaseLogs(req *services.GetReleaseLogsRequest, stream services.ReleaseService_GetReleaseLogsServer) error { func (s *ReleaseServer) GetReleaseLogs(svc services.ReleaseService_GetReleaseLogsServer) error {
t := time.NewTicker(time.Second) t := time.NewTicker(time.Second)
//go func() { done := make(chan struct{})
go func() {
for {
select {
case <-t.C:
fmt.Println("Sending a log")
svc.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}})
case <-done:
return
}
}
}()
for { for {
select { rq, err := svc.Recv()
case <-t.C: fmt.Println("Req: ", rq, " Error: ", err)
fmt.Println("Sending a log") if err != nil {
stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Test log!"}}) done <- struct{}{}
break
} }
s.logs.Subscribe(rq.Name, )
rq.Name
} }
//}()
fmt.Println("Out of the for loop")
stream.Send(&services.GetReleaseLogsResponse{Log: &release.Log{Log: "Starting to stream logs!"}})
return nil return nil
} }

Loading…
Cancel
Save