diff --git a/controller.go b/controller.go index a31f340d5..0330ff375 100644 --- a/controller.go +++ b/controller.go @@ -45,7 +45,12 @@ func (*noopController) UpdateRoutingInfo(context.Context, *protos.UpdateRoutingI return nil, fmt.Errorf("controller.UpdateRoutingInfo not implemented") } -// GetProfile implements controller interface. +// GetHealth implements controller nterface. +func (*noopController) GetHealth(context.Context, *protos.GetHealthRequest) (*protos.GetHealthReply, error) { + return nil, fmt.Errorf("controller.GetHealth not implemented") +} + +// GetProfile implements controller nterface. func (*noopController) GetProfile(context.Context, *protos.GetProfileRequest) (*protos.GetProfileReply, error) { return nil, fmt.Errorf("controller.GetProfile not implemented") } diff --git a/internal/control/controller.go b/internal/control/controller.go index 1cb65b16d..3e14f1efe 100644 --- a/internal/control/controller.go +++ b/internal/control/controller.go @@ -33,6 +33,9 @@ type Controller interface { // UpdateRoutingInfo updates the weavelet with a component's most recent routing info. UpdateRoutingInfo(context.Context, *protos.UpdateRoutingInfoRequest) (*protos.UpdateRoutingInfoReply, error) + // GetHealth fetches weavelet health information. + GetHealth(context.Context, *protos.GetHealthRequest) (*protos.GetHealthReply, error) + // GetProfile gets a profile from the weavelet. GetProfile(context.Context, *protos.GetProfileRequest) (*protos.GetProfileReply, error) } diff --git a/internal/envelope/conn/envelope_conn.go b/internal/envelope/conn/envelope_conn.go index 67be8fe49..248f13a37 100644 --- a/internal/envelope/conn/envelope_conn.go +++ b/internal/envelope/conn/envelope_conn.go @@ -114,8 +114,8 @@ func NewEnvelopeConn(ctx context.Context, r io.ReadCloser, w io.WriteCloser, inf // } // // If an EnvelopeHandler, invoked by handleMessage, calls an RPC on the - // weavelet (e.g., GetHealth), then it will block forever, as the RPC - // response will never be read by conn.recv. + // weavelet, then it will block forever, as the RPC response will never + // be read by conn.recv. e.running.Go(func() error { for { msg := &protos.WeaveletMsg{} @@ -265,19 +265,6 @@ func (e *EnvelopeConn) GetMetricsRPC() ([]*metrics.MetricSnapshot, error) { return e.metrics.Import(reply.GetMetricsReply.Update) } -// GetHealthRPC gets a weavelet's health. -func (e *EnvelopeConn) GetHealthRPC() (protos.HealthStatus, error) { - req := &protos.EnvelopeMsg{GetHealthRequest: &protos.GetHealthRequest{}} - reply, err := e.rpc(req) - if err != nil { - return protos.HealthStatus_UNHEALTHY, err - } - if reply.GetHealthReply == nil { - return protos.HealthStatus_UNHEALTHY, fmt.Errorf("nil HealthStatusReply received from weavelet") - } - return reply.GetHealthReply.Status, nil -} - // GetLoadRPC gets a load report from the weavelet. func (e *EnvelopeConn) GetLoadRPC() (*protos.LoadReport, error) { req := &protos.EnvelopeMsg{GetLoadRequest: &protos.GetLoadRequest{}} diff --git a/internal/envelope/conn/weavelet_conn.go b/internal/envelope/conn/weavelet_conn.go index 9a9787622..9fc3a3a29 100644 --- a/internal/envelope/conn/weavelet_conn.go +++ b/internal/envelope/conn/weavelet_conn.go @@ -160,11 +160,6 @@ func (w *WeaveletConn) handleMessage(handler WeaveletHandler, msg *protos.Envelo Id: -msg.Id, GetMetricsReply: &protos.GetMetricsReply{Update: update}, }) - case msg.GetHealthRequest != nil: - return w.conn.send(&protos.WeaveletMsg{ - Id: -msg.Id, - GetHealthReply: &protos.GetHealthReply{Status: protos.HealthStatus_HEALTHY}, - }) case msg.GetLoadRequest != nil: reply, err := handler.GetLoad(msg.GetLoadRequest) return w.conn.send(&protos.WeaveletMsg{ diff --git a/internal/weaver/remoteweavelet.go b/internal/weaver/remoteweavelet.go index 3a7f539d2..8c2d3af8b 100644 --- a/internal/weaver/remoteweavelet.go +++ b/internal/weaver/remoteweavelet.go @@ -571,6 +571,11 @@ func (w *RemoteWeavelet) UpdateRoutingInfo(ctx context.Context, req *protos.Upda return &protos.UpdateRoutingInfoReply{}, nil } +// GetHealth implements controller.GetHealth. +func (w *RemoteWeavelet) GetHealth(ctx context.Context, req *protos.GetHealthRequest) (*protos.GetHealthReply, error) { + return &protos.GetHealthReply{Status: protos.HealthStatus_HEALTHY}, nil +} + // GetProfile implements controller.GetProfile. func (w *RemoteWeavelet) GetProfile(ctx context.Context, req *protos.GetProfileRequest) (*protos.GetProfileReply, error) { data, err := getProfile(ctx, req) diff --git a/runtime/envelope/envelope.go b/runtime/envelope/envelope.go index 9055747b4..050fcc74b 100644 --- a/runtime/envelope/envelope.go +++ b/runtime/envelope/envelope.go @@ -311,11 +311,11 @@ func (e *Envelope) WeaveletInfo() *protos.WeaveletInfo { // GetHealth returns the health status of the weavelet. func (e *Envelope) GetHealth() protos.HealthStatus { - status, err := e.conn.GetHealthRPC() + reply, err := e.controller.GetHealth(context.TODO(), &protos.GetHealthRequest{}) if err != nil { - return protos.HealthStatus_UNHEALTHY + return protos.HealthStatus_UNKNOWN } - return status + return reply.Status } // GetProfile gets a profile from the weavelet. diff --git a/runtime/envelope/envelope_test.go b/runtime/envelope/envelope_test.go index 38f605339..7211148fb 100644 --- a/runtime/envelope/envelope_test.go +++ b/runtime/envelope/envelope_test.go @@ -432,9 +432,8 @@ func TestRPCBeforeServe(t *testing.T) { if err != nil { t.Fatal(err) } - health := e.GetHealth() - if health != protos.HealthStatus_HEALTHY { - t.Fatalf("expected healthy, got %v", health) + if _, err := e.GetMetrics(); err != nil { + t.Fatalf("expected metrics, got %v", err) } h := &handlerForTest{logSaver: testSaver(t)} diff --git a/runtime/protos/runtime.pb.go b/runtime/protos/runtime.pb.go index 8d4e0648c..13fd575e5 100644 --- a/runtime/protos/runtime.pb.go +++ b/runtime/protos/runtime.pb.go @@ -378,7 +378,6 @@ type EnvelopeMsg struct { // Handshake. EnvelopeInfo *EnvelopeInfo `protobuf:"bytes,2,opt,name=envelope_info,json=envelopeInfo,proto3" json:"envelope_info,omitempty"` // Envelope initiated RPC requests. - GetHealthRequest *GetHealthRequest `protobuf:"bytes,3,opt,name=get_health_request,json=getHealthRequest,proto3" json:"get_health_request,omitempty"` GetMetricsRequest *GetMetricsRequest `protobuf:"bytes,4,opt,name=get_metrics_request,json=getMetricsRequest,proto3" json:"get_metrics_request,omitempty"` GetLoadRequest *GetLoadRequest `protobuf:"bytes,5,opt,name=get_load_request,json=getLoadRequest,proto3" json:"get_load_request,omitempty"` // Weavelet initiated RPC replies. @@ -437,13 +436,6 @@ func (x *EnvelopeMsg) GetEnvelopeInfo() *EnvelopeInfo { return nil } -func (x *EnvelopeMsg) GetGetHealthRequest() *GetHealthRequest { - if x != nil { - return x.GetHealthRequest - } - return nil -} - func (x *EnvelopeMsg) GetGetMetricsRequest() *GetMetricsRequest { if x != nil { return x.GetMetricsRequest @@ -523,7 +515,6 @@ type WeaveletMsg struct { TraceSpans *TraceSpans `protobuf:"bytes,4,opt,name=trace_spans,json=traceSpans,proto3" json:"trace_spans,omitempty"` // Envelope initiated RPC replies. Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` // non-nil on error - GetHealthReply *GetHealthReply `protobuf:"bytes,6,opt,name=get_health_reply,json=getHealthReply,proto3" json:"get_health_reply,omitempty"` GetMetricsReply *GetMetricsReply `protobuf:"bytes,7,opt,name=get_metrics_reply,json=getMetricsReply,proto3" json:"get_metrics_reply,omitempty"` GetLoadReply *GetLoadReply `protobuf:"bytes,8,opt,name=get_load_reply,json=getLoadReply,proto3" json:"get_load_reply,omitempty"` // Weavelet initiated RPC requests. @@ -602,13 +593,6 @@ func (x *WeaveletMsg) GetError() string { return "" } -func (x *WeaveletMsg) GetGetHealthReply() *GetHealthReply { - if x != nil { - return x.GetHealthReply - } - return nil -} - func (x *WeaveletMsg) GetGetMetricsReply() *GetMetricsReply { if x != nil { return x.GetMetricsReply @@ -4038,130 +4022,122 @@ var File_runtime_protos_runtime_proto protoreflect.FileDescriptor var file_runtime_protos_runtime_proto_rawDesc = []byte{ 0x0a, 0x1c, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, - 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xa0, 0x07, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x65, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x22, 0xdd, 0x06, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0d, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x12, 0x67, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x67, 0x65, 0x74, 0x48, - 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x4a, 0x0a, 0x13, - 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x41, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, - 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x67, 0x65, 0x74, - 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x59, 0x0a, 0x18, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0a, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x70, 0x6c, 0x79, 0x52, 0x16, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5d, 0x0a, 0x1a, - 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x13, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, + 0x63, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x11, 0x67, 0x65, + 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x41, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x59, 0x0a, 0x18, 0x61, 0x63, 0x74, 0x69, + 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x16, 0x61, 0x63, 0x74, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x12, 0x5d, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, + 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, + 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x17, 0x67, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, - 0x6c, 0x79, 0x52, 0x17, 0x67, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x50, 0x0a, 0x15, 0x65, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x72, - 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x75, 0x6e, - 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x13, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5d, 0x0a, - 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x6c, 0x79, 0x12, 0x50, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, + 0x13, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5d, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x66, + 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, + 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x17, 0x67, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x70, 0x6c, 0x79, 0x52, 0x17, 0x67, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x6c, 0x0a, 0x1f, - 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, - 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x1c, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x6c, 0x0a, 0x1f, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x1c, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, - 0x08, 0x07, 0x10, 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0x98, 0x08, 0x0a, 0x0b, 0x57, - 0x65, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0d, 0x77, 0x65, - 0x61, 0x76, 0x65, 0x6c, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x57, 0x65, 0x61, 0x76, - 0x65, 0x6c, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x76, 0x65, 0x6c, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, - 0x74, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x6f, - 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, - 0x73, 0x70, 0x61, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x72, 0x75, - 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, - 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x10, 0x67, 0x65, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x0e, 0x67, 0x65, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, - 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x44, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x0f, 0x67, 0x65, 0x74, 0x4d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x67, - 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x0c, 0x67, 0x65, 0x74, 0x4c, - 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5f, 0x0a, 0x1a, 0x61, 0x63, 0x74, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, - 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x18, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x1c, 0x67, 0x65, 0x74, - 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x22, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x19, 0x67, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, - 0x0a, 0x17, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, - 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x15, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x1c, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, - 0x6c, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, - 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x52, 0x19, 0x67, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x21, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x1e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x72, 0x0a, 0x21, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6e, + 0x70, 0x6c, 0x79, 0x12, 0x6c, 0x0a, 0x1f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, + 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x70, 0x6c, 0x79, 0x52, 0x1c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x12, 0x6c, 0x0a, 0x1f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x52, 0x1e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, + 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, + 0x79, 0x52, 0x1c, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4a, + 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x07, 0x10, + 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x22, 0xdb, 0x07, 0x0a, 0x0b, 0x57, 0x65, 0x61, 0x76, + 0x65, 0x6c, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0d, 0x77, 0x65, 0x61, 0x76, 0x65, + 0x6c, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x57, 0x65, 0x61, 0x76, 0x65, 0x6c, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x76, 0x65, 0x6c, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x70, 0x61, + 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x52, 0x0a, 0x74, + 0x72, 0x61, 0x63, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, + 0x44, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x72, + 0x65, 0x70, 0x6c, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x52, 0x0f, 0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, + 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x0e, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x6f, 0x61, + 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, + 0x65, 0x70, 0x6c, 0x79, 0x52, 0x0c, 0x67, 0x65, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x12, 0x5f, 0x0a, 0x1a, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x63, + 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x18, 0x61, 0x63, 0x74, 0x69, 0x76, + 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x1c, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x19, 0x67, + 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x17, 0x65, 0x78, 0x70, 0x6f, + 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x75, 0x6e, 0x74, + 0x69, 0x6d, 0x65, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x15, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x63, 0x0a, 0x1c, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x63, 0x65, 0x72, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x19, 0x67, 0x65, 0x74, 0x53, + 0x65, 0x6c, 0x66, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x21, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x1e, 0x76, 0x65, 0x72, 0x69, 0x66, + 0x79, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x72, 0x0a, 0x21, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x79, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x1e, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4a, 0x04, 0x08, + 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x4a, 0x04, 0x08, 0x0a, 0x10, 0x0b, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x22, 0xee, 0x03, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x70, 0x6c, @@ -4635,70 +4611,68 @@ var file_runtime_protos_runtime_proto_goTypes = []interface{}{ } var file_runtime_protos_runtime_proto_depIdxs = []int32{ 8, // 0: runtime.EnvelopeMsg.envelope_info:type_name -> runtime.EnvelopeInfo - 11, // 1: runtime.EnvelopeMsg.get_health_request:type_name -> runtime.GetHealthRequest - 13, // 2: runtime.EnvelopeMsg.get_metrics_request:type_name -> runtime.GetMetricsRequest - 19, // 3: runtime.EnvelopeMsg.get_load_request:type_name -> runtime.GetLoadRequest - 31, // 4: runtime.EnvelopeMsg.activate_component_reply:type_name -> runtime.ActivateComponentReply - 33, // 5: runtime.EnvelopeMsg.get_listener_address_reply:type_name -> runtime.GetListenerAddressReply - 35, // 6: runtime.EnvelopeMsg.export_listener_reply:type_name -> runtime.ExportListenerReply - 37, // 7: runtime.EnvelopeMsg.get_self_certificate_reply:type_name -> runtime.GetSelfCertificateReply - 39, // 8: runtime.EnvelopeMsg.verify_client_certificate_reply:type_name -> runtime.VerifyClientCertificateReply - 41, // 9: runtime.EnvelopeMsg.verify_server_certificate_reply:type_name -> runtime.VerifyServerCertificateReply - 9, // 10: runtime.WeaveletMsg.weavelet_info:type_name -> runtime.WeaveletInfo - 42, // 11: runtime.WeaveletMsg.log_entry:type_name -> runtime.LogEntry - 44, // 12: runtime.WeaveletMsg.trace_spans:type_name -> runtime.TraceSpans - 12, // 13: runtime.WeaveletMsg.get_health_reply:type_name -> runtime.GetHealthReply - 14, // 14: runtime.WeaveletMsg.get_metrics_reply:type_name -> runtime.GetMetricsReply - 20, // 15: runtime.WeaveletMsg.get_load_reply:type_name -> runtime.GetLoadReply - 30, // 16: runtime.WeaveletMsg.activate_component_request:type_name -> runtime.ActivateComponentRequest - 32, // 17: runtime.WeaveletMsg.get_listener_address_request:type_name -> runtime.GetListenerAddressRequest - 34, // 18: runtime.WeaveletMsg.export_listener_request:type_name -> runtime.ExportListenerRequest - 36, // 19: runtime.WeaveletMsg.get_self_certificate_request:type_name -> runtime.GetSelfCertificateRequest - 38, // 20: runtime.WeaveletMsg.verify_client_certificate_request:type_name -> runtime.VerifyClientCertificateRequest - 40, // 21: runtime.WeaveletMsg.verify_server_certificate_request:type_name -> runtime.VerifyServerCertificateRequest - 46, // 22: runtime.EnvelopeInfo.sections:type_name -> runtime.EnvelopeInfo.SectionsEntry - 47, // 23: runtime.EnvelopeInfo.redirects:type_name -> runtime.EnvelopeInfo.Redirect - 10, // 24: runtime.WeaveletInfo.version:type_name -> runtime.SemVer - 0, // 25: runtime.GetHealthReply.status:type_name -> runtime.HealthStatus - 15, // 26: runtime.GetMetricsReply.update:type_name -> runtime.MetricUpdate - 16, // 27: runtime.MetricUpdate.defs:type_name -> runtime.MetricDef - 17, // 28: runtime.MetricUpdate.values:type_name -> runtime.MetricValue - 1, // 29: runtime.MetricDef.typ:type_name -> runtime.MetricType - 48, // 30: runtime.MetricDef.labels:type_name -> runtime.MetricDef.LabelsEntry - 1, // 31: runtime.MetricSnapshot.typ:type_name -> runtime.MetricType - 49, // 32: runtime.MetricSnapshot.labels:type_name -> runtime.MetricSnapshot.LabelsEntry - 21, // 33: runtime.GetLoadReply.load:type_name -> runtime.LoadReport - 50, // 34: runtime.LoadReport.loads:type_name -> runtime.LoadReport.LoadsEntry - 2, // 35: runtime.GetProfileRequest.profile_type:type_name -> runtime.ProfileType - 26, // 36: runtime.UpdateRoutingInfoRequest.routing_info:type_name -> runtime.RoutingInfo - 27, // 37: runtime.RoutingInfo.assignment:type_name -> runtime.Assignment - 54, // 38: runtime.Assignment.slices:type_name -> runtime.Assignment.Slice - 42, // 39: runtime.LogEntryBatch.entries:type_name -> runtime.LogEntry - 45, // 40: runtime.TraceSpans.span:type_name -> runtime.Span - 3, // 41: runtime.Span.kind:type_name -> runtime.Span.Kind - 55, // 42: runtime.Span.attributes:type_name -> runtime.Span.Attribute - 56, // 43: runtime.Span.links:type_name -> runtime.Span.Link - 57, // 44: runtime.Span.events:type_name -> runtime.Span.Event - 58, // 45: runtime.Span.status:type_name -> runtime.Span.Status - 59, // 46: runtime.Span.scope:type_name -> runtime.Span.Scope - 60, // 47: runtime.Span.library:type_name -> runtime.Span.Library - 61, // 48: runtime.Span.resource:type_name -> runtime.Span.Resource - 51, // 49: runtime.LoadReport.LoadsEntry.value:type_name -> runtime.LoadReport.ComponentLoad - 52, // 50: runtime.LoadReport.ComponentLoad.load:type_name -> runtime.LoadReport.SliceLoad - 53, // 51: runtime.LoadReport.SliceLoad.splits:type_name -> runtime.LoadReport.SubsliceLoad - 62, // 52: runtime.Span.Attribute.value:type_name -> runtime.Span.Attribute.Value - 55, // 53: runtime.Span.Link.attributes:type_name -> runtime.Span.Attribute - 55, // 54: runtime.Span.Event.attributes:type_name -> runtime.Span.Attribute - 5, // 55: runtime.Span.Status.code:type_name -> runtime.Span.Status.Code - 55, // 56: runtime.Span.Resource.attributes:type_name -> runtime.Span.Attribute - 4, // 57: runtime.Span.Attribute.Value.type:type_name -> runtime.Span.Attribute.Value.Type - 63, // 58: runtime.Span.Attribute.Value.nums:type_name -> runtime.Span.Attribute.Value.NumberList - 64, // 59: runtime.Span.Attribute.Value.strs:type_name -> runtime.Span.Attribute.Value.StringList - 60, // [60:60] is the sub-list for method output_type - 60, // [60:60] is the sub-list for method input_type - 60, // [60:60] is the sub-list for extension type_name - 60, // [60:60] is the sub-list for extension extendee - 0, // [0:60] is the sub-list for field type_name + 13, // 1: runtime.EnvelopeMsg.get_metrics_request:type_name -> runtime.GetMetricsRequest + 19, // 2: runtime.EnvelopeMsg.get_load_request:type_name -> runtime.GetLoadRequest + 31, // 3: runtime.EnvelopeMsg.activate_component_reply:type_name -> runtime.ActivateComponentReply + 33, // 4: runtime.EnvelopeMsg.get_listener_address_reply:type_name -> runtime.GetListenerAddressReply + 35, // 5: runtime.EnvelopeMsg.export_listener_reply:type_name -> runtime.ExportListenerReply + 37, // 6: runtime.EnvelopeMsg.get_self_certificate_reply:type_name -> runtime.GetSelfCertificateReply + 39, // 7: runtime.EnvelopeMsg.verify_client_certificate_reply:type_name -> runtime.VerifyClientCertificateReply + 41, // 8: runtime.EnvelopeMsg.verify_server_certificate_reply:type_name -> runtime.VerifyServerCertificateReply + 9, // 9: runtime.WeaveletMsg.weavelet_info:type_name -> runtime.WeaveletInfo + 42, // 10: runtime.WeaveletMsg.log_entry:type_name -> runtime.LogEntry + 44, // 11: runtime.WeaveletMsg.trace_spans:type_name -> runtime.TraceSpans + 14, // 12: runtime.WeaveletMsg.get_metrics_reply:type_name -> runtime.GetMetricsReply + 20, // 13: runtime.WeaveletMsg.get_load_reply:type_name -> runtime.GetLoadReply + 30, // 14: runtime.WeaveletMsg.activate_component_request:type_name -> runtime.ActivateComponentRequest + 32, // 15: runtime.WeaveletMsg.get_listener_address_request:type_name -> runtime.GetListenerAddressRequest + 34, // 16: runtime.WeaveletMsg.export_listener_request:type_name -> runtime.ExportListenerRequest + 36, // 17: runtime.WeaveletMsg.get_self_certificate_request:type_name -> runtime.GetSelfCertificateRequest + 38, // 18: runtime.WeaveletMsg.verify_client_certificate_request:type_name -> runtime.VerifyClientCertificateRequest + 40, // 19: runtime.WeaveletMsg.verify_server_certificate_request:type_name -> runtime.VerifyServerCertificateRequest + 46, // 20: runtime.EnvelopeInfo.sections:type_name -> runtime.EnvelopeInfo.SectionsEntry + 47, // 21: runtime.EnvelopeInfo.redirects:type_name -> runtime.EnvelopeInfo.Redirect + 10, // 22: runtime.WeaveletInfo.version:type_name -> runtime.SemVer + 0, // 23: runtime.GetHealthReply.status:type_name -> runtime.HealthStatus + 15, // 24: runtime.GetMetricsReply.update:type_name -> runtime.MetricUpdate + 16, // 25: runtime.MetricUpdate.defs:type_name -> runtime.MetricDef + 17, // 26: runtime.MetricUpdate.values:type_name -> runtime.MetricValue + 1, // 27: runtime.MetricDef.typ:type_name -> runtime.MetricType + 48, // 28: runtime.MetricDef.labels:type_name -> runtime.MetricDef.LabelsEntry + 1, // 29: runtime.MetricSnapshot.typ:type_name -> runtime.MetricType + 49, // 30: runtime.MetricSnapshot.labels:type_name -> runtime.MetricSnapshot.LabelsEntry + 21, // 31: runtime.GetLoadReply.load:type_name -> runtime.LoadReport + 50, // 32: runtime.LoadReport.loads:type_name -> runtime.LoadReport.LoadsEntry + 2, // 33: runtime.GetProfileRequest.profile_type:type_name -> runtime.ProfileType + 26, // 34: runtime.UpdateRoutingInfoRequest.routing_info:type_name -> runtime.RoutingInfo + 27, // 35: runtime.RoutingInfo.assignment:type_name -> runtime.Assignment + 54, // 36: runtime.Assignment.slices:type_name -> runtime.Assignment.Slice + 42, // 37: runtime.LogEntryBatch.entries:type_name -> runtime.LogEntry + 45, // 38: runtime.TraceSpans.span:type_name -> runtime.Span + 3, // 39: runtime.Span.kind:type_name -> runtime.Span.Kind + 55, // 40: runtime.Span.attributes:type_name -> runtime.Span.Attribute + 56, // 41: runtime.Span.links:type_name -> runtime.Span.Link + 57, // 42: runtime.Span.events:type_name -> runtime.Span.Event + 58, // 43: runtime.Span.status:type_name -> runtime.Span.Status + 59, // 44: runtime.Span.scope:type_name -> runtime.Span.Scope + 60, // 45: runtime.Span.library:type_name -> runtime.Span.Library + 61, // 46: runtime.Span.resource:type_name -> runtime.Span.Resource + 51, // 47: runtime.LoadReport.LoadsEntry.value:type_name -> runtime.LoadReport.ComponentLoad + 52, // 48: runtime.LoadReport.ComponentLoad.load:type_name -> runtime.LoadReport.SliceLoad + 53, // 49: runtime.LoadReport.SliceLoad.splits:type_name -> runtime.LoadReport.SubsliceLoad + 62, // 50: runtime.Span.Attribute.value:type_name -> runtime.Span.Attribute.Value + 55, // 51: runtime.Span.Link.attributes:type_name -> runtime.Span.Attribute + 55, // 52: runtime.Span.Event.attributes:type_name -> runtime.Span.Attribute + 5, // 53: runtime.Span.Status.code:type_name -> runtime.Span.Status.Code + 55, // 54: runtime.Span.Resource.attributes:type_name -> runtime.Span.Attribute + 4, // 55: runtime.Span.Attribute.Value.type:type_name -> runtime.Span.Attribute.Value.Type + 63, // 56: runtime.Span.Attribute.Value.nums:type_name -> runtime.Span.Attribute.Value.NumberList + 64, // 57: runtime.Span.Attribute.Value.strs:type_name -> runtime.Span.Attribute.Value.StringList + 58, // [58:58] is the sub-list for method output_type + 58, // [58:58] is the sub-list for method input_type + 58, // [58:58] is the sub-list for extension type_name + 58, // [58:58] is the sub-list for extension extendee + 0, // [0:58] is the sub-list for field type_name } func init() { file_runtime_protos_runtime_proto_init() } diff --git a/runtime/protos/runtime.proto b/runtime/protos/runtime.proto index a610f9852..cf4e73491 100644 --- a/runtime/protos/runtime.proto +++ b/runtime/protos/runtime.proto @@ -97,7 +97,6 @@ message EnvelopeMsg { EnvelopeInfo envelope_info = 2; // Envelope initiated RPC requests. - GetHealthRequest get_health_request = 3; GetMetricsRequest get_metrics_request = 4; GetLoadRequest get_load_request = 5; @@ -110,7 +109,7 @@ message EnvelopeMsg { VerifyClientCertificateReply verify_client_certificate_reply = 13; VerifyServerCertificateReply verify_server_certificate_reply = 14; - reserved 6, 7, 8; + reserved 3, 6, 7, 8; } // WeaveletMsg is a message sent by a weavelet to an envelope. @@ -130,7 +129,6 @@ message WeaveletMsg { // Envelope initiated RPC replies. string error = 5; // non-nil on error - GetHealthReply get_health_reply = 6; GetMetricsReply get_metrics_reply = 7; GetLoadReply get_load_reply = 8; @@ -142,7 +140,7 @@ message WeaveletMsg { VerifyClientCertificateRequest verify_client_certificate_request = 15; VerifyServerCertificateRequest verify_server_certificate_request = 16; - reserved 9, 10, 11; + reserved 6, 9, 10, 11; } // EnvelopeInfo is the information provided by an envelope to a weavelet during diff --git a/runtime/protos/version_test.go b/runtime/protos/version_test.go index 9eb6226fe..40323921a 100644 --- a/runtime/protos/version_test.go +++ b/runtime/protos/version_test.go @@ -45,7 +45,7 @@ func TestDeployerVersion(t *testing.T) { got := fmt.Sprintf("%x", h.Sum(nil)) // If runtime.proto has changed, the deployer API version may need updating. - const want = "ebf594eced1e857f5cd24af3d95988e82260a61baf2e86100ee85ac6ac8d6ea3" + const want = "a4c589df11159cafac26f242d5be7a55116c399b2e2a3e75db347a42b5b9e991" if got != want { t.Fatalf(`Unexpected SHA-256 hash of runtime.proto: got %s, want %s. If this change is meaningful, REMEMBER TO UPDATE THE DEPLOYER API VERSION in runtime/version/version.go.`, got, want) } diff --git a/weaver_gen.go b/weaver_gen.go index 5dd675bd7..4d0734ab5 100644 --- a/weaver_gen.go +++ b/weaver_gen.go @@ -37,10 +37,10 @@ func init() { Iface: reflect.TypeOf((*controller)(nil)).Elem(), Impl: reflect.TypeOf(noopController{}), LocalStubFn: func(impl any, caller string, tracer trace.Tracer) any { - return controller_local_stub{impl: impl.(controller), tracer: tracer, getProfileMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetProfile", Remote: false}), updateComponentsMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateComponents", Remote: false}), updateRoutingInfoMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateRoutingInfo", Remote: false})} + return controller_local_stub{impl: impl.(controller), tracer: tracer, getHealthMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetHealth", Remote: false}), getProfileMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetProfile", Remote: false}), updateComponentsMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateComponents", Remote: false}), updateRoutingInfoMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateRoutingInfo", Remote: false})} }, ClientStubFn: func(stub codegen.Stub, caller string) any { - return controller_client_stub{stub: stub, getProfileMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetProfile", Remote: true}), updateComponentsMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateComponents", Remote: true}), updateRoutingInfoMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateRoutingInfo", Remote: true})} + return controller_client_stub{stub: stub, getHealthMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetHealth", Remote: true}), getProfileMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "GetProfile", Remote: true}), updateComponentsMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateComponents", Remote: true}), updateRoutingInfoMetrics: codegen.MethodMetricsFor(codegen.MethodLabels{Caller: caller, Component: "github.com/ServiceWeaver/weaver/controller", Method: "UpdateRoutingInfo", Remote: true})} }, ServerStubFn: func(impl any, addLoad func(uint64, float64)) codegen.Server { return controller_server_stub{impl: impl.(controller), addLoad: addLoad} @@ -94,6 +94,7 @@ func (s logger_local_stub) LogBatch(ctx context.Context, a0 *protos.LogEntryBatc type controller_local_stub struct { impl controller tracer trace.Tracer + getHealthMetrics *codegen.MethodMetrics getProfileMetrics *codegen.MethodMetrics updateComponentsMetrics *codegen.MethodMetrics updateRoutingInfoMetrics *codegen.MethodMetrics @@ -102,6 +103,26 @@ type controller_local_stub struct { // Check that controller_local_stub implements the controller interface. var _ controller = (*controller_local_stub)(nil) +func (s controller_local_stub) GetHealth(ctx context.Context, a0 *protos.GetHealthRequest) (r0 *protos.GetHealthReply, err error) { + // Update metrics. + begin := s.getHealthMetrics.Begin() + defer func() { s.getHealthMetrics.End(begin, err != nil, 0, 0) }() + span := trace.SpanFromContext(ctx) + if span.SpanContext().IsValid() { + // Create a child span for this method. + ctx, span = s.tracer.Start(ctx, "weaver.controller.GetHealth", trace.WithSpanKind(trace.SpanKindInternal)) + defer func() { + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + } + span.End() + }() + } + + return s.impl.GetHealth(ctx, a0) +} + func (s controller_local_stub) GetProfile(ctx context.Context, a0 *protos.GetProfileRequest) (r0 *protos.GetProfileReply, err error) { // Update metrics. begin := s.getProfileMetrics.Begin() @@ -224,6 +245,7 @@ func (s logger_client_stub) LogBatch(ctx context.Context, a0 *protos.LogEntryBat type controller_client_stub struct { stub codegen.Stub + getHealthMetrics *codegen.MethodMetrics getProfileMetrics *codegen.MethodMetrics updateComponentsMetrics *codegen.MethodMetrics updateRoutingInfoMetrics *codegen.MethodMetrics @@ -232,6 +254,57 @@ type controller_client_stub struct { // Check that controller_client_stub implements the controller interface. var _ controller = (*controller_client_stub)(nil) +func (s controller_client_stub) GetHealth(ctx context.Context, a0 *protos.GetHealthRequest) (r0 *protos.GetHealthReply, err error) { + // Update metrics. + var requestBytes, replyBytes int + begin := s.getHealthMetrics.Begin() + defer func() { s.getHealthMetrics.End(begin, err != nil, requestBytes, replyBytes) }() + + span := trace.SpanFromContext(ctx) + if span.SpanContext().IsValid() { + // Create a child span for this method. + ctx, span = s.stub.Tracer().Start(ctx, "weaver.controller.GetHealth", trace.WithSpanKind(trace.SpanKindClient)) + } + + defer func() { + // Catch and return any panics detected during encoding/decoding/rpc. + if err == nil { + err = codegen.CatchPanics(recover()) + if err != nil { + err = errors.Join(RemoteCallError, err) + } + } + + if err != nil { + span.RecordError(err) + span.SetStatus(codes.Error, err.Error()) + } + span.End() + + }() + + // Encode arguments. + enc := codegen.NewEncoder() + serviceweaver_enc_ptr_GetHealthRequest_fd6083fb(enc, a0) + var shardKey uint64 + + // Call the remote method. + requestBytes = len(enc.Data()) + var results []byte + results, err = s.stub.Run(ctx, 0, enc.Data(), shardKey) + replyBytes = len(results) + if err != nil { + err = errors.Join(RemoteCallError, err) + return + } + + // Decode the results. + dec := codegen.NewDecoder(results) + r0 = serviceweaver_dec_ptr_GetHealthReply_b2d11423(dec) + err = dec.Error() + return +} + func (s controller_client_stub) GetProfile(ctx context.Context, a0 *protos.GetProfileRequest) (r0 *protos.GetProfileReply, err error) { // Update metrics. var requestBytes, replyBytes int @@ -269,7 +342,7 @@ func (s controller_client_stub) GetProfile(ctx context.Context, a0 *protos.GetPr // Call the remote method. requestBytes = len(enc.Data()) var results []byte - results, err = s.stub.Run(ctx, 0, enc.Data(), shardKey) + results, err = s.stub.Run(ctx, 1, enc.Data(), shardKey) replyBytes = len(results) if err != nil { err = errors.Join(RemoteCallError, err) @@ -320,7 +393,7 @@ func (s controller_client_stub) UpdateComponents(ctx context.Context, a0 *protos // Call the remote method. requestBytes = len(enc.Data()) var results []byte - results, err = s.stub.Run(ctx, 1, enc.Data(), shardKey) + results, err = s.stub.Run(ctx, 2, enc.Data(), shardKey) replyBytes = len(results) if err != nil { err = errors.Join(RemoteCallError, err) @@ -371,7 +444,7 @@ func (s controller_client_stub) UpdateRoutingInfo(ctx context.Context, a0 *proto // Call the remote method. requestBytes = len(enc.Data()) var results []byte - results, err = s.stub.Run(ctx, 2, enc.Data(), shardKey) + results, err = s.stub.Run(ctx, 3, enc.Data(), shardKey) replyBytes = len(results) if err != nil { err = errors.Join(RemoteCallError, err) @@ -463,6 +536,8 @@ var _ codegen.Server = (*controller_server_stub)(nil) // GetStubFn implements the codegen.Server interface. func (s controller_server_stub) GetStubFn(method string) func(ctx context.Context, args []byte) ([]byte, error) { switch method { + case "GetHealth": + return s.getHealth case "GetProfile": return s.getProfile case "UpdateComponents": @@ -474,6 +549,31 @@ func (s controller_server_stub) GetStubFn(method string) func(ctx context.Contex } } +func (s controller_server_stub) getHealth(ctx context.Context, args []byte) (res []byte, err error) { + // Catch and return any panics detected during encoding/decoding/rpc. + defer func() { + if err == nil { + err = codegen.CatchPanics(recover()) + } + }() + + // Decode arguments. + dec := codegen.NewDecoder(args) + var a0 *protos.GetHealthRequest + a0 = serviceweaver_dec_ptr_GetHealthRequest_fd6083fb(dec) + + // TODO(rgrandl): The deferred function above will recover from panics in the + // user code: fix this. + // Call the local method. + r0, appErr := s.impl.GetHealth(ctx, a0) + + // Encode the results. + enc := codegen.NewEncoder() + serviceweaver_enc_ptr_GetHealthReply_b2d11423(enc, r0) + enc.Error(appErr) + return enc.Data(), nil +} + func (s controller_server_stub) getProfile(ctx context.Context, args []byte) (res []byte, err error) { // Catch and return any panics detected during encoding/decoding/rpc. defer func() { @@ -570,6 +670,11 @@ type controller_reflect_stub struct { // Check that controller_reflect_stub implements the controller interface. var _ controller = (*controller_reflect_stub)(nil) +func (s controller_reflect_stub) GetHealth(ctx context.Context, a0 *protos.GetHealthRequest) (r0 *protos.GetHealthReply, err error) { + err = s.caller("GetHealth", ctx, []any{a0}, []any{&r0}) + return +} + func (s controller_reflect_stub) GetProfile(ctx context.Context, a0 *protos.GetProfileRequest) (r0 *protos.GetProfileReply, err error) { err = s.caller("GetProfile", ctx, []any{a0}, []any{&r0}) return @@ -605,6 +710,42 @@ func serviceweaver_dec_ptr_LogEntryBatch_fec9a5d4(dec *codegen.Decoder) *protos. return &res } +func serviceweaver_enc_ptr_GetHealthRequest_fd6083fb(enc *codegen.Encoder, arg *protos.GetHealthRequest) { + if arg == nil { + enc.Bool(false) + } else { + enc.Bool(true) + enc.EncodeProto(arg) + } +} + +func serviceweaver_dec_ptr_GetHealthRequest_fd6083fb(dec *codegen.Decoder) *protos.GetHealthRequest { + if !dec.Bool() { + return nil + } + var res protos.GetHealthRequest + dec.DecodeProto(&res) + return &res +} + +func serviceweaver_enc_ptr_GetHealthReply_b2d11423(enc *codegen.Encoder, arg *protos.GetHealthReply) { + if arg == nil { + enc.Bool(false) + } else { + enc.Bool(true) + enc.EncodeProto(arg) + } +} + +func serviceweaver_dec_ptr_GetHealthReply_b2d11423(dec *codegen.Decoder) *protos.GetHealthReply { + if !dec.Bool() { + return nil + } + var res protos.GetHealthReply + dec.DecodeProto(&res) + return &res +} + func serviceweaver_enc_ptr_GetProfileRequest_d1544fcf(enc *codegen.Encoder, arg *protos.GetProfileRequest) { if arg == nil { enc.Bool(false) diff --git a/website/blog/deployers/deployers_test.go b/website/blog/deployers/deployers_test.go index 4e7765dfe..5c2767597 100644 --- a/website/blog/deployers/deployers_test.go +++ b/website/blog/deployers/deployers_test.go @@ -19,6 +19,7 @@ import ( "fmt" "io" "net/http" + "os" "os/exec" "strings" "sync" @@ -31,6 +32,7 @@ func build(t *testing.T, dirs ...string) { t.Helper() for _, dir := range dirs { cmd := exec.Command("go", "build", ".") + cmd.Stderr = os.Stderr cmd.Dir = dir if err := cmd.Run(); err != nil { t.Fatal(err) @@ -42,6 +44,7 @@ func build(t *testing.T, dirs ...string) { func TestPipesDeployer(t *testing.T) { build(t, "./pipes", "../../../examples/collatz") cmd := exec.Command("./pipes/pipes", "../../../examples/collatz/collatz") + cmd.Stderr = os.Stderr if err := cmd.Run(); err != nil { t.Fatal(err) } diff --git a/website/blog/deployers/pipes/main.go b/website/blog/deployers/pipes/main.go index 6376ecc8a..b5cd331b3 100644 --- a/website/blog/deployers/pipes/main.go +++ b/website/blog/deployers/pipes/main.go @@ -101,16 +101,16 @@ func run(ctx context.Context, binary string) error { } fmt.Println(prototext.Format(&reply)) - // Step 4. Send a GetHealth RPC to the weavelet. + // Step 4. Send a GetLoad RPC to the weavelet. req := &protos.EnvelopeMsg{ - Id: 42, - GetHealthRequest: &protos.GetHealthRequest{}, + Id: 42, + GetLoadRequest: &protos.GetLoadRequest{}, } if err := protomsg.Write(envelopeWriter, req); err != nil { return err } - // Step 5. Receive a reply to the GetHealth RPC, ignoring other messages. + // Step 5. Receive a reply to the GetLoad RPC, ignoring other messages. for { var reply protos.WeaveletMsg if err := protomsg.Read(envelopeReader, &reply); err != nil {