From cab048c62298b794b2e44e5d070017a03d6a83ba Mon Sep 17 00:00:00 2001 From: Sas Swart Date: Fri, 10 Jul 2026 08:57:56 +0000 Subject: [PATCH 1/2] feat(agent): record and expose timestamped unit events --- agent/agentsocket/client.go | 49 + agent/agentsocket/proto/agentsocket.pb.go | 977 +++++++++++------- agent/agentsocket/proto/agentsocket.proto | 32 + .../agentsocket/proto/agentsocket_drpc.pb.go | 54 +- agent/agentsocket/proto/version.go | 6 +- agent/agentsocket/service.go | 41 + agent/agentsocket/service_test.go | 118 +++ agent/unit/events.go | 40 + agent/unit/events_test.go | 175 ++++ agent/unit/manager.go | 82 +- .../status_json_format.golden | 17 + 11 files changed, 1235 insertions(+), 356 deletions(-) create mode 100644 agent/unit/events.go create mode 100644 agent/unit/events_test.go diff --git a/agent/agentsocket/client.go b/agent/agentsocket/client.go index c038edf1fd2..975fdd5d5db 100644 --- a/agent/agentsocket/client.go +++ b/agent/agentsocket/client.go @@ -2,6 +2,7 @@ package agentsocket import ( "context" + "time" "golang.org/x/xerrors" "storj.io/drpc" @@ -134,14 +135,48 @@ func (c *Client) SyncStatus(ctx context.Context, unitName unit.ID) (SyncStatusRe }) } + var history []UnitEvent + for _, ev := range resp.History { + history = append(history, unitEventFromProto(ev)) + } + return SyncStatusResponse{ UnitName: unitName, Status: unit.Status(resp.Status), IsReady: resp.IsReady, Dependencies: dependencies, + History: history, }, nil } +// SyncTimeline returns the full event log of unit status transitions and +// dependency declarations across all units, ordered by sequence number. +func (c *Client) SyncTimeline(ctx context.Context) ([]UnitEvent, error) { + resp, err := c.client.SyncTimeline(ctx, &proto.SyncTimelineRequest{}) + if err != nil { + return nil, err + } + + events := make([]UnitEvent, 0, len(resp.Events)) + for _, ev := range resp.Events { + events = append(events, unitEventFromProto(ev)) + } + return events, nil +} + +func unitEventFromProto(ev *proto.UnitEvent) UnitEvent { + return UnitEvent{ + Seq: ev.GetSeq(), + Time: ev.GetTime().AsTime(), + Kind: unit.EventKind(ev.GetKind()), + Unit: unit.ID(ev.GetUnit()), + From: unit.Status(ev.GetFrom()), + To: unit.Status(ev.GetTo()), + DependsOn: unit.ID(ev.GetDependsOn()), + RequiredStatus: unit.Status(ev.GetRequiredStatus()), + } +} + // SyncList returns all registered units and their current statuses. func (c *Client) SyncList(ctx context.Context) ([]SyncListItem, error) { resp, err := c.client.SyncList(ctx, &proto.SyncListRequest{}) @@ -258,6 +293,7 @@ type SyncStatusResponse struct { Status unit.Status `table:"status" json:"status"` IsReady bool `table:"ready" json:"is_ready"` Dependencies []DependencyInfo `table:"dependencies" json:"dependencies"` + History []UnitEvent `table:"history" json:"history"` } // SyncListItem contains summary information for a single unit. @@ -275,6 +311,19 @@ type DependencyInfo struct { IsSatisfied bool `table:"satisfied" json:"is_satisfied"` } +// UnitEvent is an immutable record of a change to the dependency graph: +// either a unit status transition or a dependency declaration. +type UnitEvent struct { + Seq uint64 `table:"seq,default_sort" json:"seq"` + Time time.Time `table:"time" json:"time"` + Kind unit.EventKind `table:"kind" json:"kind"` + Unit unit.ID `table:"unit" json:"unit"` + From unit.Status `table:"from" json:"from,omitempty"` + To unit.Status `table:"to" json:"to,omitempty"` + DependsOn unit.ID `table:"depends on" json:"depends_on,omitempty"` + RequiredStatus unit.Status `table:"required status" json:"required_status,omitempty"` +} + // ContextSource is a registered workspace-context scan root. type ContextSource struct { Path string `table:"path,default_sort" json:"path"` diff --git a/agent/agentsocket/proto/agentsocket.pb.go b/agent/agentsocket/proto/agentsocket.pb.go index 42f2a252292..30337332034 100644 --- a/agent/agentsocket/proto/agentsocket.pb.go +++ b/agent/agentsocket/proto/agentsocket.pb.go @@ -10,6 +10,7 @@ import ( proto "github.com/coder/coder/v2/agent/proto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -590,6 +591,8 @@ type SyncStatusResponse struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` IsReady bool `protobuf:"varint,2,opt,name=is_ready,json=isReady,proto3" json:"is_ready,omitempty"` Dependencies []*DependencyInfo `protobuf:"bytes,3,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + // history contains this unit's recorded events, ordered by seq. + History []*UnitEvent `protobuf:"bytes,4,rep,name=history,proto3" json:"history,omitempty"` } func (x *SyncStatusResponse) Reset() { @@ -645,6 +648,210 @@ func (x *SyncStatusResponse) GetDependencies() []*DependencyInfo { return nil } +func (x *SyncStatusResponse) GetHistory() []*UnitEvent { + if x != nil { + return x.History + } + return nil +} + +// UnitEvent is an immutable record of a change to the dependency graph: +// either a unit status transition or a dependency declaration. +type UnitEvent struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // seq is a monotonic, agent-global sequence number. Within one agent, + // seq order equals time order. + Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` + // kind is "status_change" or "dependency_added". + Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` + Unit string `protobuf:"bytes,4,opt,name=unit,proto3" json:"unit,omitempty"` + // from and to are set for status_change events. from is empty for the + // initial registration event. + From string `protobuf:"bytes,5,opt,name=from,proto3" json:"from,omitempty"` + To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` + // depends_on and required_status are set for dependency_added events. + DependsOn string `protobuf:"bytes,7,opt,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` + RequiredStatus string `protobuf:"bytes,8,opt,name=required_status,json=requiredStatus,proto3" json:"required_status,omitempty"` +} + +func (x *UnitEvent) Reset() { + *x = UnitEvent{} + if protoimpl.UnsafeEnabled { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnitEvent) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnitEvent) ProtoMessage() {} + +func (x *UnitEvent) ProtoReflect() protoreflect.Message { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnitEvent.ProtoReflect.Descriptor instead. +func (*UnitEvent) Descriptor() ([]byte, []int) { + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{13} +} + +func (x *UnitEvent) GetSeq() uint64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *UnitEvent) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *UnitEvent) GetKind() string { + if x != nil { + return x.Kind + } + return "" +} + +func (x *UnitEvent) GetUnit() string { + if x != nil { + return x.Unit + } + return "" +} + +func (x *UnitEvent) GetFrom() string { + if x != nil { + return x.From + } + return "" +} + +func (x *UnitEvent) GetTo() string { + if x != nil { + return x.To + } + return "" +} + +func (x *UnitEvent) GetDependsOn() string { + if x != nil { + return x.DependsOn + } + return "" +} + +func (x *UnitEvent) GetRequiredStatus() string { + if x != nil { + return x.RequiredStatus + } + return "" +} + +type SyncTimelineRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SyncTimelineRequest) Reset() { + *x = SyncTimelineRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncTimelineRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncTimelineRequest) ProtoMessage() {} + +func (x *SyncTimelineRequest) ProtoReflect() protoreflect.Message { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncTimelineRequest.ProtoReflect.Descriptor instead. +func (*SyncTimelineRequest) Descriptor() ([]byte, []int) { + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{14} +} + +type SyncTimelineResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // events contains all recorded events across all units, ordered by seq. + Events []*UnitEvent `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` +} + +func (x *SyncTimelineResponse) Reset() { + *x = SyncTimelineResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncTimelineResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncTimelineResponse) ProtoMessage() {} + +func (x *SyncTimelineResponse) ProtoReflect() protoreflect.Message { + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncTimelineResponse.ProtoReflect.Descriptor instead. +func (*SyncTimelineResponse) Descriptor() ([]byte, []int) { + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{15} +} + +func (x *SyncTimelineResponse) GetEvents() []*UnitEvent { + if x != nil { + return x.Events + } + return nil +} + type SyncListRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -654,7 +861,7 @@ type SyncListRequest struct { func (x *SyncListRequest) Reset() { *x = SyncListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[13] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -667,7 +874,7 @@ func (x *SyncListRequest) String() string { func (*SyncListRequest) ProtoMessage() {} func (x *SyncListRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[13] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -680,7 +887,7 @@ func (x *SyncListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncListRequest.ProtoReflect.Descriptor instead. func (*SyncListRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{13} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{16} } // UnitInfo represents a single unit vertex in the dependency graph. @@ -698,7 +905,7 @@ type UnitInfo struct { func (x *UnitInfo) Reset() { *x = UnitInfo{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[14] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -711,7 +918,7 @@ func (x *UnitInfo) String() string { func (*UnitInfo) ProtoMessage() {} func (x *UnitInfo) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[14] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -724,7 +931,7 @@ func (x *UnitInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use UnitInfo.ProtoReflect.Descriptor instead. func (*UnitInfo) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{14} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{17} } func (x *UnitInfo) GetUnit() string { @@ -759,7 +966,7 @@ type SyncListResponse struct { func (x *SyncListResponse) Reset() { *x = SyncListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[15] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -772,7 +979,7 @@ func (x *SyncListResponse) String() string { func (*SyncListResponse) ProtoMessage() {} func (x *SyncListResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[15] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -785,7 +992,7 @@ func (x *SyncListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncListResponse.ProtoReflect.Descriptor instead. func (*SyncListResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{15} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{18} } func (x *SyncListResponse) GetUnits() []*UnitInfo { @@ -809,7 +1016,7 @@ type ContextSource struct { func (x *ContextSource) Reset() { *x = ContextSource{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[16] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -822,7 +1029,7 @@ func (x *ContextSource) String() string { func (*ContextSource) ProtoMessage() {} func (x *ContextSource) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[16] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -835,7 +1042,7 @@ func (x *ContextSource) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSource.ProtoReflect.Descriptor instead. func (*ContextSource) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{16} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{19} } func (x *ContextSource) GetPath() string { @@ -854,7 +1061,7 @@ type ContextSourcesRequest struct { func (x *ContextSourcesRequest) Reset() { *x = ContextSourcesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[17] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -867,7 +1074,7 @@ func (x *ContextSourcesRequest) String() string { func (*ContextSourcesRequest) ProtoMessage() {} func (x *ContextSourcesRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[17] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -880,7 +1087,7 @@ func (x *ContextSourcesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSourcesRequest.ProtoReflect.Descriptor instead. func (*ContextSourcesRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{17} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{20} } type ContextSourcesResponse struct { @@ -894,7 +1101,7 @@ type ContextSourcesResponse struct { func (x *ContextSourcesResponse) Reset() { *x = ContextSourcesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[18] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -907,7 +1114,7 @@ func (x *ContextSourcesResponse) String() string { func (*ContextSourcesResponse) ProtoMessage() {} func (x *ContextSourcesResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[18] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -920,7 +1127,7 @@ func (x *ContextSourcesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSourcesResponse.ProtoReflect.Descriptor instead. func (*ContextSourcesResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{18} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{21} } func (x *ContextSourcesResponse) GetSources() []*ContextSource { @@ -941,7 +1148,7 @@ type GetContextSourceRequest struct { func (x *GetContextSourceRequest) Reset() { *x = GetContextSourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[19] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -954,7 +1161,7 @@ func (x *GetContextSourceRequest) String() string { func (*GetContextSourceRequest) ProtoMessage() {} func (x *GetContextSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[19] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -967,7 +1174,7 @@ func (x *GetContextSourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetContextSourceRequest.ProtoReflect.Descriptor instead. func (*GetContextSourceRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{19} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{22} } func (x *GetContextSourceRequest) GetPath() string { @@ -988,7 +1195,7 @@ type GetContextSourceResponse struct { func (x *GetContextSourceResponse) Reset() { *x = GetContextSourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[20] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1001,7 +1208,7 @@ func (x *GetContextSourceResponse) String() string { func (*GetContextSourceResponse) ProtoMessage() {} func (x *GetContextSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[20] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1014,7 +1221,7 @@ func (x *GetContextSourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetContextSourceResponse.ProtoReflect.Descriptor instead. func (*GetContextSourceResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{20} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{23} } func (x *GetContextSourceResponse) GetSource() *ContextSource { @@ -1035,7 +1242,7 @@ type AddContextSourceRequest struct { func (x *AddContextSourceRequest) Reset() { *x = AddContextSourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[21] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1048,7 +1255,7 @@ func (x *AddContextSourceRequest) String() string { func (*AddContextSourceRequest) ProtoMessage() {} func (x *AddContextSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[21] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1061,7 +1268,7 @@ func (x *AddContextSourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddContextSourceRequest.ProtoReflect.Descriptor instead. func (*AddContextSourceRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{21} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{24} } func (x *AddContextSourceRequest) GetPath() string { @@ -1082,7 +1289,7 @@ type AddContextSourceResponse struct { func (x *AddContextSourceResponse) Reset() { *x = AddContextSourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[22] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1095,7 +1302,7 @@ func (x *AddContextSourceResponse) String() string { func (*AddContextSourceResponse) ProtoMessage() {} func (x *AddContextSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[22] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1108,7 +1315,7 @@ func (x *AddContextSourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddContextSourceResponse.ProtoReflect.Descriptor instead. func (*AddContextSourceResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{22} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{25} } func (x *AddContextSourceResponse) GetSource() *ContextSource { @@ -1129,7 +1336,7 @@ type RemoveContextSourceRequest struct { func (x *RemoveContextSourceRequest) Reset() { *x = RemoveContextSourceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[23] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1142,7 +1349,7 @@ func (x *RemoveContextSourceRequest) String() string { func (*RemoveContextSourceRequest) ProtoMessage() {} func (x *RemoveContextSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[23] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1155,7 +1362,7 @@ func (x *RemoveContextSourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveContextSourceRequest.ProtoReflect.Descriptor instead. func (*RemoveContextSourceRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{23} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{26} } func (x *RemoveContextSourceRequest) GetPath() string { @@ -1174,7 +1381,7 @@ type RemoveContextSourceResponse struct { func (x *RemoveContextSourceResponse) Reset() { *x = RemoveContextSourceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[24] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1394,7 @@ func (x *RemoveContextSourceResponse) String() string { func (*RemoveContextSourceResponse) ProtoMessage() {} func (x *RemoveContextSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[24] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1407,7 @@ func (x *RemoveContextSourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RemoveContextSourceResponse.ProtoReflect.Descriptor instead. func (*RemoveContextSourceResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{24} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{27} } // ContextResource is the on-wire form of a resolved context resource. @@ -1228,7 +1435,7 @@ type ContextResource struct { func (x *ContextResource) Reset() { *x = ContextResource{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[25] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1241,7 +1448,7 @@ func (x *ContextResource) String() string { func (*ContextResource) ProtoMessage() {} func (x *ContextResource) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[25] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1254,7 +1461,7 @@ func (x *ContextResource) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextResource.ProtoReflect.Descriptor instead. func (*ContextResource) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{25} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{28} } func (x *ContextResource) GetId() string { @@ -1343,7 +1550,7 @@ type ContextSnapshot struct { func (x *ContextSnapshot) Reset() { *x = ContextSnapshot{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[26] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1356,7 +1563,7 @@ func (x *ContextSnapshot) String() string { func (*ContextSnapshot) ProtoMessage() {} func (x *ContextSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[26] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1369,7 +1576,7 @@ func (x *ContextSnapshot) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSnapshot.ProtoReflect.Descriptor instead. func (*ContextSnapshot) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{26} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{29} } func (x *ContextSnapshot) GetVersion() uint64 { @@ -1416,7 +1623,7 @@ type ContextSnapshotRequest struct { func (x *ContextSnapshotRequest) Reset() { *x = ContextSnapshotRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[27] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1429,7 +1636,7 @@ func (x *ContextSnapshotRequest) String() string { func (*ContextSnapshotRequest) ProtoMessage() {} func (x *ContextSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[27] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1442,7 +1649,7 @@ func (x *ContextSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSnapshotRequest.ProtoReflect.Descriptor instead. func (*ContextSnapshotRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{27} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{30} } type ContextSnapshotResponse struct { @@ -1456,7 +1663,7 @@ type ContextSnapshotResponse struct { func (x *ContextSnapshotResponse) Reset() { *x = ContextSnapshotResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[28] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1469,7 +1676,7 @@ func (x *ContextSnapshotResponse) String() string { func (*ContextSnapshotResponse) ProtoMessage() {} func (x *ContextSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[28] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1482,7 +1689,7 @@ func (x *ContextSnapshotResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ContextSnapshotResponse.ProtoReflect.Descriptor instead. func (*ContextSnapshotResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{28} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{31} } func (x *ContextSnapshotResponse) GetSnapshot() *ContextSnapshot { @@ -1501,7 +1708,7 @@ type ResyncContextRequest struct { func (x *ResyncContextRequest) Reset() { *x = ResyncContextRequest{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[29] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1514,7 +1721,7 @@ func (x *ResyncContextRequest) String() string { func (*ResyncContextRequest) ProtoMessage() {} func (x *ResyncContextRequest) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[29] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1527,7 +1734,7 @@ func (x *ResyncContextRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResyncContextRequest.ProtoReflect.Descriptor instead. func (*ResyncContextRequest) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{29} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{32} } type ResyncContextResponse struct { @@ -1541,7 +1748,7 @@ type ResyncContextResponse struct { func (x *ResyncContextResponse) Reset() { *x = ResyncContextResponse{} if protoimpl.UnsafeEnabled { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[30] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1554,7 +1761,7 @@ func (x *ResyncContextResponse) String() string { func (*ResyncContextResponse) ProtoMessage() {} func (x *ResyncContextResponse) ProtoReflect() protoreflect.Message { - mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[30] + mi := &file_agent_agentsocket_proto_agentsocket_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1567,7 +1774,7 @@ func (x *ResyncContextResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResyncContextResponse.ProtoReflect.Descriptor instead. func (*ResyncContextResponse) Descriptor() ([]byte, []int) { - return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{30} + return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{33} } func (x *ResyncContextResponse) GetSnapshot() *ContextSnapshot { @@ -1585,235 +1792,268 @@ var file_agent_agentsocket_proto_agentsocket_proto_rawDesc = []byte{ 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x50, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x22, 0x12, 0x0a, 0x10, - 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x29, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x29, 0x0a, 0x11, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x27, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, - 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, - 0xb6, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, - 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, - 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x73, 0x61, 0x74, 0x69, - 0x73, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, - 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x64, 0x22, 0x91, 0x01, 0x0a, 0x12, 0x53, 0x79, 0x6e, - 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x22, 0x11, 0x0a, 0x0f, - 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x51, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, - 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x22, 0x48, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0x23, 0x0a, 0x0d, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x50, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, + 0x69, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x57, + 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, + 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x22, 0x12, 0x0a, + 0x10, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x29, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x16, 0x0a, 0x14, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x29, 0x0a, 0x11, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x27, 0x0a, 0x11, 0x53, 0x79, 0x6e, 0x63, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x22, 0xb6, 0x01, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, + 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, + 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, + 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x25, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x73, 0x61, 0x74, + 0x69, 0x73, 0x66, 0x69, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69, 0x65, 0x64, 0x22, 0xcc, 0x01, 0x0a, 0x12, 0x53, 0x79, + 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, + 0x61, 0x64, 0x79, 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, + 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x39, 0x0a, + 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x41, - 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, + 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xe1, 0x01, 0x0a, 0x09, 0x55, 0x6e, 0x69, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x74, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, + 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, + 0x73, 0x4f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, + 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, + 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x65, + 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x48, 0x0a, 0x10, 0x53, 0x79, + 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, + 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, + 0x6e, 0x69, 0x74, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x41, 0x64, - 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1d, 0x0a, 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, - 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, - 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0f, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, - 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, - 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x5a, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x32, 0xa6, 0x0b, - 0x0a, 0x0b, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4d, 0x0a, - 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, - 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, + 0x72, 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, + 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, + 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1d, 0x0a, + 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x02, 0x0a, + 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, + 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, + 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, + 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, + 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x15, 0x52, 0x65, 0x73, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x32, 0x8d, 0x0c, 0x0a, 0x0b, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, - 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x53, 0x79, - 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x12, 0x25, + 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, + 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, - 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, + 0x79, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, + 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, + 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, + 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, + 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x64, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x41, 0x64, - 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, - 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x41, 0x64, 0x64, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, - 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, - 0x2c, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, - 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x2e, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x13, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2c, + 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x52, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, + 0x76, 0x32, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1828,7 +2068,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP() []byte { return file_agent_agentsocket_proto_agentsocket_proto_rawDescData } -var file_agent_agentsocket_proto_agentsocket_proto_msgTypes = make([]protoimpl.MessageInfo, 31) +var file_agent_agentsocket_proto_agentsocket_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_agent_agentsocket_proto_agentsocket_proto_goTypes = []interface{}{ (*PingRequest)(nil), // 0: coder.agentsocket.v1.PingRequest (*PingResponse)(nil), // 1: coder.agentsocket.v1.PingResponse @@ -1843,69 +2083,78 @@ var file_agent_agentsocket_proto_agentsocket_proto_goTypes = []interface{}{ (*SyncStatusRequest)(nil), // 10: coder.agentsocket.v1.SyncStatusRequest (*DependencyInfo)(nil), // 11: coder.agentsocket.v1.DependencyInfo (*SyncStatusResponse)(nil), // 12: coder.agentsocket.v1.SyncStatusResponse - (*SyncListRequest)(nil), // 13: coder.agentsocket.v1.SyncListRequest - (*UnitInfo)(nil), // 14: coder.agentsocket.v1.UnitInfo - (*SyncListResponse)(nil), // 15: coder.agentsocket.v1.SyncListResponse - (*ContextSource)(nil), // 16: coder.agentsocket.v1.ContextSource - (*ContextSourcesRequest)(nil), // 17: coder.agentsocket.v1.ContextSourcesRequest - (*ContextSourcesResponse)(nil), // 18: coder.agentsocket.v1.ContextSourcesResponse - (*GetContextSourceRequest)(nil), // 19: coder.agentsocket.v1.GetContextSourceRequest - (*GetContextSourceResponse)(nil), // 20: coder.agentsocket.v1.GetContextSourceResponse - (*AddContextSourceRequest)(nil), // 21: coder.agentsocket.v1.AddContextSourceRequest - (*AddContextSourceResponse)(nil), // 22: coder.agentsocket.v1.AddContextSourceResponse - (*RemoveContextSourceRequest)(nil), // 23: coder.agentsocket.v1.RemoveContextSourceRequest - (*RemoveContextSourceResponse)(nil), // 24: coder.agentsocket.v1.RemoveContextSourceResponse - (*ContextResource)(nil), // 25: coder.agentsocket.v1.ContextResource - (*ContextSnapshot)(nil), // 26: coder.agentsocket.v1.ContextSnapshot - (*ContextSnapshotRequest)(nil), // 27: coder.agentsocket.v1.ContextSnapshotRequest - (*ContextSnapshotResponse)(nil), // 28: coder.agentsocket.v1.ContextSnapshotResponse - (*ResyncContextRequest)(nil), // 29: coder.agentsocket.v1.ResyncContextRequest - (*ResyncContextResponse)(nil), // 30: coder.agentsocket.v1.ResyncContextResponse - (*proto.UpdateAppStatusRequest)(nil), // 31: coder.agent.v2.UpdateAppStatusRequest - (*proto.UpdateAppStatusResponse)(nil), // 32: coder.agent.v2.UpdateAppStatusResponse + (*UnitEvent)(nil), // 13: coder.agentsocket.v1.UnitEvent + (*SyncTimelineRequest)(nil), // 14: coder.agentsocket.v1.SyncTimelineRequest + (*SyncTimelineResponse)(nil), // 15: coder.agentsocket.v1.SyncTimelineResponse + (*SyncListRequest)(nil), // 16: coder.agentsocket.v1.SyncListRequest + (*UnitInfo)(nil), // 17: coder.agentsocket.v1.UnitInfo + (*SyncListResponse)(nil), // 18: coder.agentsocket.v1.SyncListResponse + (*ContextSource)(nil), // 19: coder.agentsocket.v1.ContextSource + (*ContextSourcesRequest)(nil), // 20: coder.agentsocket.v1.ContextSourcesRequest + (*ContextSourcesResponse)(nil), // 21: coder.agentsocket.v1.ContextSourcesResponse + (*GetContextSourceRequest)(nil), // 22: coder.agentsocket.v1.GetContextSourceRequest + (*GetContextSourceResponse)(nil), // 23: coder.agentsocket.v1.GetContextSourceResponse + (*AddContextSourceRequest)(nil), // 24: coder.agentsocket.v1.AddContextSourceRequest + (*AddContextSourceResponse)(nil), // 25: coder.agentsocket.v1.AddContextSourceResponse + (*RemoveContextSourceRequest)(nil), // 26: coder.agentsocket.v1.RemoveContextSourceRequest + (*RemoveContextSourceResponse)(nil), // 27: coder.agentsocket.v1.RemoveContextSourceResponse + (*ContextResource)(nil), // 28: coder.agentsocket.v1.ContextResource + (*ContextSnapshot)(nil), // 29: coder.agentsocket.v1.ContextSnapshot + (*ContextSnapshotRequest)(nil), // 30: coder.agentsocket.v1.ContextSnapshotRequest + (*ContextSnapshotResponse)(nil), // 31: coder.agentsocket.v1.ContextSnapshotResponse + (*ResyncContextRequest)(nil), // 32: coder.agentsocket.v1.ResyncContextRequest + (*ResyncContextResponse)(nil), // 33: coder.agentsocket.v1.ResyncContextResponse + (*timestamppb.Timestamp)(nil), // 34: google.protobuf.Timestamp + (*proto.UpdateAppStatusRequest)(nil), // 35: coder.agent.v2.UpdateAppStatusRequest + (*proto.UpdateAppStatusResponse)(nil), // 36: coder.agent.v2.UpdateAppStatusResponse } var file_agent_agentsocket_proto_agentsocket_proto_depIdxs = []int32{ 11, // 0: coder.agentsocket.v1.SyncStatusResponse.dependencies:type_name -> coder.agentsocket.v1.DependencyInfo - 14, // 1: coder.agentsocket.v1.SyncListResponse.units:type_name -> coder.agentsocket.v1.UnitInfo - 16, // 2: coder.agentsocket.v1.ContextSourcesResponse.sources:type_name -> coder.agentsocket.v1.ContextSource - 16, // 3: coder.agentsocket.v1.GetContextSourceResponse.source:type_name -> coder.agentsocket.v1.ContextSource - 16, // 4: coder.agentsocket.v1.AddContextSourceResponse.source:type_name -> coder.agentsocket.v1.ContextSource - 25, // 5: coder.agentsocket.v1.ContextSnapshot.resources:type_name -> coder.agentsocket.v1.ContextResource - 26, // 6: coder.agentsocket.v1.ContextSnapshotResponse.snapshot:type_name -> coder.agentsocket.v1.ContextSnapshot - 26, // 7: coder.agentsocket.v1.ResyncContextResponse.snapshot:type_name -> coder.agentsocket.v1.ContextSnapshot - 0, // 8: coder.agentsocket.v1.AgentSocket.Ping:input_type -> coder.agentsocket.v1.PingRequest - 2, // 9: coder.agentsocket.v1.AgentSocket.SyncStart:input_type -> coder.agentsocket.v1.SyncStartRequest - 4, // 10: coder.agentsocket.v1.AgentSocket.SyncWant:input_type -> coder.agentsocket.v1.SyncWantRequest - 6, // 11: coder.agentsocket.v1.AgentSocket.SyncComplete:input_type -> coder.agentsocket.v1.SyncCompleteRequest - 8, // 12: coder.agentsocket.v1.AgentSocket.SyncReady:input_type -> coder.agentsocket.v1.SyncReadyRequest - 10, // 13: coder.agentsocket.v1.AgentSocket.SyncStatus:input_type -> coder.agentsocket.v1.SyncStatusRequest - 13, // 14: coder.agentsocket.v1.AgentSocket.SyncList:input_type -> coder.agentsocket.v1.SyncListRequest - 31, // 15: coder.agentsocket.v1.AgentSocket.UpdateAppStatus:input_type -> coder.agent.v2.UpdateAppStatusRequest - 17, // 16: coder.agentsocket.v1.AgentSocket.ContextSources:input_type -> coder.agentsocket.v1.ContextSourcesRequest - 19, // 17: coder.agentsocket.v1.AgentSocket.GetContextSource:input_type -> coder.agentsocket.v1.GetContextSourceRequest - 21, // 18: coder.agentsocket.v1.AgentSocket.AddContextSource:input_type -> coder.agentsocket.v1.AddContextSourceRequest - 23, // 19: coder.agentsocket.v1.AgentSocket.RemoveContextSource:input_type -> coder.agentsocket.v1.RemoveContextSourceRequest - 27, // 20: coder.agentsocket.v1.AgentSocket.GetContextSnapshot:input_type -> coder.agentsocket.v1.ContextSnapshotRequest - 29, // 21: coder.agentsocket.v1.AgentSocket.ResyncContext:input_type -> coder.agentsocket.v1.ResyncContextRequest - 1, // 22: coder.agentsocket.v1.AgentSocket.Ping:output_type -> coder.agentsocket.v1.PingResponse - 3, // 23: coder.agentsocket.v1.AgentSocket.SyncStart:output_type -> coder.agentsocket.v1.SyncStartResponse - 5, // 24: coder.agentsocket.v1.AgentSocket.SyncWant:output_type -> coder.agentsocket.v1.SyncWantResponse - 7, // 25: coder.agentsocket.v1.AgentSocket.SyncComplete:output_type -> coder.agentsocket.v1.SyncCompleteResponse - 9, // 26: coder.agentsocket.v1.AgentSocket.SyncReady:output_type -> coder.agentsocket.v1.SyncReadyResponse - 12, // 27: coder.agentsocket.v1.AgentSocket.SyncStatus:output_type -> coder.agentsocket.v1.SyncStatusResponse - 15, // 28: coder.agentsocket.v1.AgentSocket.SyncList:output_type -> coder.agentsocket.v1.SyncListResponse - 32, // 29: coder.agentsocket.v1.AgentSocket.UpdateAppStatus:output_type -> coder.agent.v2.UpdateAppStatusResponse - 18, // 30: coder.agentsocket.v1.AgentSocket.ContextSources:output_type -> coder.agentsocket.v1.ContextSourcesResponse - 20, // 31: coder.agentsocket.v1.AgentSocket.GetContextSource:output_type -> coder.agentsocket.v1.GetContextSourceResponse - 22, // 32: coder.agentsocket.v1.AgentSocket.AddContextSource:output_type -> coder.agentsocket.v1.AddContextSourceResponse - 24, // 33: coder.agentsocket.v1.AgentSocket.RemoveContextSource:output_type -> coder.agentsocket.v1.RemoveContextSourceResponse - 28, // 34: coder.agentsocket.v1.AgentSocket.GetContextSnapshot:output_type -> coder.agentsocket.v1.ContextSnapshotResponse - 30, // 35: coder.agentsocket.v1.AgentSocket.ResyncContext:output_type -> coder.agentsocket.v1.ResyncContextResponse - 22, // [22:36] is the sub-list for method output_type - 8, // [8:22] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 13, // 1: coder.agentsocket.v1.SyncStatusResponse.history:type_name -> coder.agentsocket.v1.UnitEvent + 34, // 2: coder.agentsocket.v1.UnitEvent.time:type_name -> google.protobuf.Timestamp + 13, // 3: coder.agentsocket.v1.SyncTimelineResponse.events:type_name -> coder.agentsocket.v1.UnitEvent + 17, // 4: coder.agentsocket.v1.SyncListResponse.units:type_name -> coder.agentsocket.v1.UnitInfo + 19, // 5: coder.agentsocket.v1.ContextSourcesResponse.sources:type_name -> coder.agentsocket.v1.ContextSource + 19, // 6: coder.agentsocket.v1.GetContextSourceResponse.source:type_name -> coder.agentsocket.v1.ContextSource + 19, // 7: coder.agentsocket.v1.AddContextSourceResponse.source:type_name -> coder.agentsocket.v1.ContextSource + 28, // 8: coder.agentsocket.v1.ContextSnapshot.resources:type_name -> coder.agentsocket.v1.ContextResource + 29, // 9: coder.agentsocket.v1.ContextSnapshotResponse.snapshot:type_name -> coder.agentsocket.v1.ContextSnapshot + 29, // 10: coder.agentsocket.v1.ResyncContextResponse.snapshot:type_name -> coder.agentsocket.v1.ContextSnapshot + 0, // 11: coder.agentsocket.v1.AgentSocket.Ping:input_type -> coder.agentsocket.v1.PingRequest + 2, // 12: coder.agentsocket.v1.AgentSocket.SyncStart:input_type -> coder.agentsocket.v1.SyncStartRequest + 4, // 13: coder.agentsocket.v1.AgentSocket.SyncWant:input_type -> coder.agentsocket.v1.SyncWantRequest + 6, // 14: coder.agentsocket.v1.AgentSocket.SyncComplete:input_type -> coder.agentsocket.v1.SyncCompleteRequest + 8, // 15: coder.agentsocket.v1.AgentSocket.SyncReady:input_type -> coder.agentsocket.v1.SyncReadyRequest + 10, // 16: coder.agentsocket.v1.AgentSocket.SyncStatus:input_type -> coder.agentsocket.v1.SyncStatusRequest + 16, // 17: coder.agentsocket.v1.AgentSocket.SyncList:input_type -> coder.agentsocket.v1.SyncListRequest + 14, // 18: coder.agentsocket.v1.AgentSocket.SyncTimeline:input_type -> coder.agentsocket.v1.SyncTimelineRequest + 35, // 19: coder.agentsocket.v1.AgentSocket.UpdateAppStatus:input_type -> coder.agent.v2.UpdateAppStatusRequest + 20, // 20: coder.agentsocket.v1.AgentSocket.ContextSources:input_type -> coder.agentsocket.v1.ContextSourcesRequest + 22, // 21: coder.agentsocket.v1.AgentSocket.GetContextSource:input_type -> coder.agentsocket.v1.GetContextSourceRequest + 24, // 22: coder.agentsocket.v1.AgentSocket.AddContextSource:input_type -> coder.agentsocket.v1.AddContextSourceRequest + 26, // 23: coder.agentsocket.v1.AgentSocket.RemoveContextSource:input_type -> coder.agentsocket.v1.RemoveContextSourceRequest + 30, // 24: coder.agentsocket.v1.AgentSocket.GetContextSnapshot:input_type -> coder.agentsocket.v1.ContextSnapshotRequest + 32, // 25: coder.agentsocket.v1.AgentSocket.ResyncContext:input_type -> coder.agentsocket.v1.ResyncContextRequest + 1, // 26: coder.agentsocket.v1.AgentSocket.Ping:output_type -> coder.agentsocket.v1.PingResponse + 3, // 27: coder.agentsocket.v1.AgentSocket.SyncStart:output_type -> coder.agentsocket.v1.SyncStartResponse + 5, // 28: coder.agentsocket.v1.AgentSocket.SyncWant:output_type -> coder.agentsocket.v1.SyncWantResponse + 7, // 29: coder.agentsocket.v1.AgentSocket.SyncComplete:output_type -> coder.agentsocket.v1.SyncCompleteResponse + 9, // 30: coder.agentsocket.v1.AgentSocket.SyncReady:output_type -> coder.agentsocket.v1.SyncReadyResponse + 12, // 31: coder.agentsocket.v1.AgentSocket.SyncStatus:output_type -> coder.agentsocket.v1.SyncStatusResponse + 18, // 32: coder.agentsocket.v1.AgentSocket.SyncList:output_type -> coder.agentsocket.v1.SyncListResponse + 15, // 33: coder.agentsocket.v1.AgentSocket.SyncTimeline:output_type -> coder.agentsocket.v1.SyncTimelineResponse + 36, // 34: coder.agentsocket.v1.AgentSocket.UpdateAppStatus:output_type -> coder.agent.v2.UpdateAppStatusResponse + 21, // 35: coder.agentsocket.v1.AgentSocket.ContextSources:output_type -> coder.agentsocket.v1.ContextSourcesResponse + 23, // 36: coder.agentsocket.v1.AgentSocket.GetContextSource:output_type -> coder.agentsocket.v1.GetContextSourceResponse + 25, // 37: coder.agentsocket.v1.AgentSocket.AddContextSource:output_type -> coder.agentsocket.v1.AddContextSourceResponse + 27, // 38: coder.agentsocket.v1.AgentSocket.RemoveContextSource:output_type -> coder.agentsocket.v1.RemoveContextSourceResponse + 31, // 39: coder.agentsocket.v1.AgentSocket.GetContextSnapshot:output_type -> coder.agentsocket.v1.ContextSnapshotResponse + 33, // 40: coder.agentsocket.v1.AgentSocket.ResyncContext:output_type -> coder.agentsocket.v1.ResyncContextResponse + 26, // [26:41] is the sub-list for method output_type + 11, // [11:26] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_agent_agentsocket_proto_agentsocket_proto_init() } @@ -2071,7 +2320,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncListRequest); i { + switch v := v.(*UnitEvent); i { case 0: return &v.state case 1: @@ -2083,7 +2332,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UnitInfo); i { + switch v := v.(*SyncTimelineRequest); i { case 0: return &v.state case 1: @@ -2095,7 +2344,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncListResponse); i { + switch v := v.(*SyncTimelineResponse); i { case 0: return &v.state case 1: @@ -2107,7 +2356,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSource); i { + switch v := v.(*SyncListRequest); i { case 0: return &v.state case 1: @@ -2119,7 +2368,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSourcesRequest); i { + switch v := v.(*UnitInfo); i { case 0: return &v.state case 1: @@ -2131,7 +2380,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSourcesResponse); i { + switch v := v.(*SyncListResponse); i { case 0: return &v.state case 1: @@ -2143,7 +2392,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetContextSourceRequest); i { + switch v := v.(*ContextSource); i { case 0: return &v.state case 1: @@ -2155,7 +2404,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetContextSourceResponse); i { + switch v := v.(*ContextSourcesRequest); i { case 0: return &v.state case 1: @@ -2167,7 +2416,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddContextSourceRequest); i { + switch v := v.(*ContextSourcesResponse); i { case 0: return &v.state case 1: @@ -2179,7 +2428,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddContextSourceResponse); i { + switch v := v.(*GetContextSourceRequest); i { case 0: return &v.state case 1: @@ -2191,7 +2440,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContextSourceRequest); i { + switch v := v.(*GetContextSourceResponse); i { case 0: return &v.state case 1: @@ -2203,7 +2452,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveContextSourceResponse); i { + switch v := v.(*AddContextSourceRequest); i { case 0: return &v.state case 1: @@ -2215,7 +2464,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextResource); i { + switch v := v.(*AddContextSourceResponse); i { case 0: return &v.state case 1: @@ -2227,7 +2476,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSnapshot); i { + switch v := v.(*RemoveContextSourceRequest); i { case 0: return &v.state case 1: @@ -2239,7 +2488,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSnapshotRequest); i { + switch v := v.(*RemoveContextSourceResponse); i { case 0: return &v.state case 1: @@ -2251,7 +2500,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContextSnapshotResponse); i { + switch v := v.(*ContextResource); i { case 0: return &v.state case 1: @@ -2263,7 +2512,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResyncContextRequest); i { + switch v := v.(*ContextSnapshot); i { case 0: return &v.state case 1: @@ -2275,6 +2524,42 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { } } file_agent_agentsocket_proto_agentsocket_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContextSnapshotRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agent_agentsocket_proto_agentsocket_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContextSnapshotResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agent_agentsocket_proto_agentsocket_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResyncContextRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_agent_agentsocket_proto_agentsocket_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ResyncContextResponse); i { case 0: return &v.state @@ -2293,7 +2578,7 @@ func file_agent_agentsocket_proto_agentsocket_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_agent_agentsocket_proto_agentsocket_proto_rawDesc, NumEnums: 0, - NumMessages: 31, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, diff --git a/agent/agentsocket/proto/agentsocket.proto b/agent/agentsocket/proto/agentsocket.proto index d9139e880bd..2cdb0546094 100644 --- a/agent/agentsocket/proto/agentsocket.proto +++ b/agent/agentsocket/proto/agentsocket.proto @@ -4,6 +4,7 @@ option go_package = "github.com/coder/coder/v2/agent/agentsocket/proto"; package coder.agentsocket.v1; import "agent/proto/agent.proto"; +import "google/protobuf/timestamp.proto"; message PingRequest {} @@ -54,6 +55,34 @@ message SyncStatusResponse { string status = 1; bool is_ready = 2; repeated DependencyInfo dependencies = 3; + // history contains this unit's recorded events, ordered by seq. + repeated UnitEvent history = 4; +} + +// UnitEvent is an immutable record of a change to the dependency graph: +// either a unit status transition or a dependency declaration. +message UnitEvent { + // seq is a monotonic, agent-global sequence number. Within one agent, + // seq order equals time order. + uint64 seq = 1; + google.protobuf.Timestamp time = 2; + // kind is "status_change" or "dependency_added". + string kind = 3; + string unit = 4; + // from and to are set for status_change events. from is empty for the + // initial registration event. + string from = 5; + string to = 6; + // depends_on and required_status are set for dependency_added events. + string depends_on = 7; + string required_status = 8; +} + +message SyncTimelineRequest {} + +message SyncTimelineResponse { + // events contains all recorded events across all units, ordered by seq. + repeated UnitEvent events = 1; } message SyncListRequest {} @@ -160,6 +189,9 @@ service AgentSocket { rpc SyncStatus(SyncStatusRequest) returns (SyncStatusResponse); // List all registered units and their current statuses. rpc SyncList(SyncListRequest) returns (SyncListResponse); + // Return the full event log of unit status transitions and dependency + // declarations across all units, ordered by sequence number. + rpc SyncTimeline(SyncTimelineRequest) returns (SyncTimelineResponse); // Update app status, forwarded to coderd. rpc UpdateAppStatus(coder.agent.v2.UpdateAppStatusRequest) returns (coder.agent.v2.UpdateAppStatusResponse); // List the workspace context sources registered on the agent. diff --git a/agent/agentsocket/proto/agentsocket_drpc.pb.go b/agent/agentsocket/proto/agentsocket_drpc.pb.go index 664443072d2..d072f0f0f5f 100644 --- a/agent/agentsocket/proto/agentsocket_drpc.pb.go +++ b/agent/agentsocket/proto/agentsocket_drpc.pb.go @@ -46,6 +46,7 @@ type DRPCAgentSocketClient interface { SyncReady(ctx context.Context, in *SyncReadyRequest) (*SyncReadyResponse, error) SyncStatus(ctx context.Context, in *SyncStatusRequest) (*SyncStatusResponse, error) SyncList(ctx context.Context, in *SyncListRequest) (*SyncListResponse, error) + SyncTimeline(ctx context.Context, in *SyncTimelineRequest) (*SyncTimelineResponse, error) UpdateAppStatus(ctx context.Context, in *proto1.UpdateAppStatusRequest) (*proto1.UpdateAppStatusResponse, error) ContextSources(ctx context.Context, in *ContextSourcesRequest) (*ContextSourcesResponse, error) GetContextSource(ctx context.Context, in *GetContextSourceRequest) (*GetContextSourceResponse, error) @@ -128,6 +129,15 @@ func (c *drpcAgentSocketClient) SyncList(ctx context.Context, in *SyncListReques return out, nil } +func (c *drpcAgentSocketClient) SyncTimeline(ctx context.Context, in *SyncTimelineRequest) (*SyncTimelineResponse, error) { + out := new(SyncTimelineResponse) + err := c.cc.Invoke(ctx, "/coder.agentsocket.v1.AgentSocket/SyncTimeline", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, in, out) + if err != nil { + return nil, err + } + return out, nil +} + func (c *drpcAgentSocketClient) UpdateAppStatus(ctx context.Context, in *proto1.UpdateAppStatusRequest) (*proto1.UpdateAppStatusResponse, error) { out := new(proto1.UpdateAppStatusResponse) err := c.cc.Invoke(ctx, "/coder.agentsocket.v1.AgentSocket/UpdateAppStatus", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, in, out) @@ -199,6 +209,7 @@ type DRPCAgentSocketServer interface { SyncReady(context.Context, *SyncReadyRequest) (*SyncReadyResponse, error) SyncStatus(context.Context, *SyncStatusRequest) (*SyncStatusResponse, error) SyncList(context.Context, *SyncListRequest) (*SyncListResponse, error) + SyncTimeline(context.Context, *SyncTimelineRequest) (*SyncTimelineResponse, error) UpdateAppStatus(context.Context, *proto1.UpdateAppStatusRequest) (*proto1.UpdateAppStatusResponse, error) ContextSources(context.Context, *ContextSourcesRequest) (*ContextSourcesResponse, error) GetContextSource(context.Context, *GetContextSourceRequest) (*GetContextSourceResponse, error) @@ -238,6 +249,10 @@ func (s *DRPCAgentSocketUnimplementedServer) SyncList(context.Context, *SyncList return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } +func (s *DRPCAgentSocketUnimplementedServer) SyncTimeline(context.Context, *SyncTimelineRequest) (*SyncTimelineResponse, error) { + return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) +} + func (s *DRPCAgentSocketUnimplementedServer) UpdateAppStatus(context.Context, *proto1.UpdateAppStatusRequest) (*proto1.UpdateAppStatusResponse, error) { return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented) } @@ -268,7 +283,7 @@ func (s *DRPCAgentSocketUnimplementedServer) ResyncContext(context.Context, *Res type DRPCAgentSocketDescription struct{} -func (DRPCAgentSocketDescription) NumMethods() int { return 14 } +func (DRPCAgentSocketDescription) NumMethods() int { return 15 } func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) { switch n { @@ -336,6 +351,15 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec ) }, DRPCAgentSocketServer.SyncList, true case 7: + return "/coder.agentsocket.v1.AgentSocket/SyncTimeline", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, + func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { + return srv.(DRPCAgentSocketServer). + SyncTimeline( + ctx, + in1.(*SyncTimelineRequest), + ) + }, DRPCAgentSocketServer.SyncTimeline, true + case 8: return "/coder.agentsocket.v1.AgentSocket/UpdateAppStatus", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -344,7 +368,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*proto1.UpdateAppStatusRequest), ) }, DRPCAgentSocketServer.UpdateAppStatus, true - case 8: + case 9: return "/coder.agentsocket.v1.AgentSocket/ContextSources", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -353,7 +377,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*ContextSourcesRequest), ) }, DRPCAgentSocketServer.ContextSources, true - case 9: + case 10: return "/coder.agentsocket.v1.AgentSocket/GetContextSource", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -362,7 +386,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*GetContextSourceRequest), ) }, DRPCAgentSocketServer.GetContextSource, true - case 10: + case 11: return "/coder.agentsocket.v1.AgentSocket/AddContextSource", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -371,7 +395,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*AddContextSourceRequest), ) }, DRPCAgentSocketServer.AddContextSource, true - case 11: + case 12: return "/coder.agentsocket.v1.AgentSocket/RemoveContextSource", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -380,7 +404,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*RemoveContextSourceRequest), ) }, DRPCAgentSocketServer.RemoveContextSource, true - case 12: + case 13: return "/coder.agentsocket.v1.AgentSocket/GetContextSnapshot", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -389,7 +413,7 @@ func (DRPCAgentSocketDescription) Method(n int) (string, drpc.Encoding, drpc.Rec in1.(*ContextSnapshotRequest), ) }, DRPCAgentSocketServer.GetContextSnapshot, true - case 13: + case 14: return "/coder.agentsocket.v1.AgentSocket/ResyncContext", drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}, func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) { return srv.(DRPCAgentSocketServer). @@ -519,6 +543,22 @@ func (x *drpcAgentSocket_SyncListStream) SendAndClose(m *SyncListResponse) error return x.CloseSend() } +type DRPCAgentSocket_SyncTimelineStream interface { + drpc.Stream + SendAndClose(*SyncTimelineResponse) error +} + +type drpcAgentSocket_SyncTimelineStream struct { + drpc.Stream +} + +func (x *drpcAgentSocket_SyncTimelineStream) SendAndClose(m *SyncTimelineResponse) error { + if err := x.MsgSend(m, drpcEncoding_File_agent_agentsocket_proto_agentsocket_proto{}); err != nil { + return err + } + return x.CloseSend() +} + type DRPCAgentSocket_UpdateAppStatusStream interface { drpc.Stream SendAndClose(*proto1.UpdateAppStatusResponse) error diff --git a/agent/agentsocket/proto/version.go b/agent/agentsocket/proto/version.go index ee373de0038..bfb7b88dbd8 100644 --- a/agent/agentsocket/proto/version.go +++ b/agent/agentsocket/proto/version.go @@ -14,10 +14,14 @@ import "github.com/coder/coder/v2/apiversion" // // API v1.2: // - SyncList RPC (list all registered units) +// +// API v1.3: +// - SyncTimeline RPC (full unit event log) +// - SyncStatusResponse.history field (per-unit event log) const ( CurrentMajor = 1 - CurrentMinor = 2 + CurrentMinor = 3 ) var CurrentVersion = apiversion.New(CurrentMajor, CurrentMinor) diff --git a/agent/agentsocket/service.go b/agent/agentsocket/service.go index 8f2f5748513..7c166837b47 100644 --- a/agent/agentsocket/service.go +++ b/agent/agentsocket/service.go @@ -7,6 +7,7 @@ import ( "sync" "golang.org/x/xerrors" + "google.golang.org/protobuf/types/known/timestamppb" "cdr.dev/slog/v3" "github.com/coder/coder/v2/agent/agentcontext" @@ -185,10 +186,20 @@ func (s *DRPCAgentSocketService) SyncStatus(_ context.Context, req *proto.SyncSt if err != nil { return nil, xerrors.Errorf("cannot get status for unit %q: %w", req.Unit, err) } + + var history []*proto.UnitEvent + for _, ev := range s.unitManager.Events() { + if ev.Unit != unitID { + continue + } + history = append(history, unitEventToProto(ev)) + } + return &proto.SyncStatusResponse{ Status: string(u.Status()), IsReady: isReady, Dependencies: depInfos, + History: history, }, nil } @@ -215,6 +226,36 @@ func (s *DRPCAgentSocketService) SyncList(_ context.Context, _ *proto.SyncListRe return &proto.SyncListResponse{Units: unitInfos}, nil } +// SyncTimeline returns the full event log of unit status transitions and +// dependency declarations across all units, ordered by sequence number. +func (s *DRPCAgentSocketService) SyncTimeline(_ context.Context, _ *proto.SyncTimelineRequest) (*proto.SyncTimelineResponse, error) { + if s.unitManager == nil { + return nil, xerrors.Errorf("cannot get timeline: %w", ErrUnitManagerNotAvailable) + } + + events := s.unitManager.Events() + protoEvents := make([]*proto.UnitEvent, 0, len(events)) + for _, ev := range events { + protoEvents = append(protoEvents, unitEventToProto(ev)) + } + + return &proto.SyncTimelineResponse{Events: protoEvents}, nil +} + +// unitEventToProto converts a unit.Event to its on-wire form. +func unitEventToProto(ev unit.Event) *proto.UnitEvent { + return &proto.UnitEvent{ + Seq: ev.Seq, + Time: timestamppb.New(ev.Time), + Kind: string(ev.Kind), + Unit: string(ev.Unit), + From: string(ev.From), + To: string(ev.To), + DependsOn: string(ev.DependsOn), + RequiredStatus: string(ev.RequiredStatus), + } +} + // UpdateAppStatus forwards an app status update to coderd via the // agent API. Returns an error if the agent is not connected. func (s *DRPCAgentSocketService) UpdateAppStatus(ctx context.Context, req *agentproto.UpdateAppStatusRequest) (*agentproto.UpdateAppStatusResponse, error) { diff --git a/agent/agentsocket/service_test.go b/agent/agentsocket/service_test.go index 4d26614ef2a..a1513478908 100644 --- a/agent/agentsocket/service_test.go +++ b/agent/agentsocket/service_test.go @@ -365,6 +365,124 @@ func TestDRPCAgentSocketService(t *testing.T) { }) }) + t.Run("SyncTimeline", func(t *testing.T) { + t.Parallel() + + t.Run("Empty", func(t *testing.T) { + t.Parallel() + + socketPath := testutil.AgentSocketPath(t) + ctx := testutil.Context(t, testutil.WaitShort) + server, err := agentsocket.NewServer( + slog.Make().Leveled(slog.LevelDebug), + agentsocket.WithPath(socketPath), + ) + require.NoError(t, err) + defer server.Close() + + client := newSocketClient(ctx, t, socketPath) + + events, err := client.SyncTimeline(ctx) + require.NoError(t, err) + require.Empty(t, events) + }) + + t.Run("RecordsEventsAcrossUnits", func(t *testing.T) { + t.Parallel() + + socketPath := testutil.AgentSocketPath(t) + ctx := testutil.Context(t, testutil.WaitShort) + server, err := agentsocket.NewServer( + slog.Make().Leveled(slog.LevelDebug), + agentsocket.WithPath(socketPath), + ) + require.NoError(t, err) + defer server.Close() + + client := newSocketClient(ctx, t, socketPath) + + // dependent-unit registers and declares a dependency on + // test-unit, which then runs to completion. + err = client.SyncWant(ctx, "dependent-unit", "test-unit") + require.NoError(t, err) + err = client.SyncStart(ctx, "test-unit") + require.NoError(t, err) + err = client.SyncComplete(ctx, "test-unit") + require.NoError(t, err) + err = client.SyncStart(ctx, "dependent-unit") + require.NoError(t, err) + + events, err := client.SyncTimeline(ctx) + require.NoError(t, err) + + type eventShape struct { + kind unit.EventKind + unitID unit.ID + from, to unit.Status + dependsOn unit.ID + requiredStatus unit.Status + } + got := make([]eventShape, 0, len(events)) + wantSeq := uint64(1) + for _, ev := range events { + // Seq is contiguous from 1 and matches the response order. + require.Equal(t, wantSeq, ev.Seq) + wantSeq++ + require.False(t, ev.Time.IsZero()) + got = append(got, eventShape{ + kind: ev.Kind, + unitID: ev.Unit, + from: ev.From, + to: ev.To, + dependsOn: ev.DependsOn, + requiredStatus: ev.RequiredStatus, + }) + } + require.Equal(t, []eventShape{ + {kind: unit.EventStatusChange, unitID: "dependent-unit", from: unit.StatusNotRegistered, to: unit.StatusPending}, + {kind: unit.EventDependencyAdded, unitID: "dependent-unit", dependsOn: "test-unit", requiredStatus: unit.StatusComplete}, + {kind: unit.EventStatusChange, unitID: "test-unit", from: unit.StatusNotRegistered, to: unit.StatusPending}, + {kind: unit.EventStatusChange, unitID: "test-unit", from: unit.StatusPending, to: unit.StatusStarted}, + {kind: unit.EventStatusChange, unitID: "test-unit", from: unit.StatusStarted, to: unit.StatusComplete}, + {kind: unit.EventStatusChange, unitID: "dependent-unit", from: unit.StatusPending, to: unit.StatusStarted}, + }, got) + }) + }) + + t.Run("SyncStatusHistory", func(t *testing.T) { + t.Parallel() + + socketPath := testutil.AgentSocketPath(t) + ctx := testutil.Context(t, testutil.WaitShort) + server, err := agentsocket.NewServer( + slog.Make().Leveled(slog.LevelDebug), + agentsocket.WithPath(socketPath), + ) + require.NoError(t, err) + defer server.Close() + + client := newSocketClient(ctx, t, socketPath) + + err = client.SyncStart(ctx, "test-unit") + require.NoError(t, err) + err = client.SyncStart(ctx, "other-unit") + require.NoError(t, err) + err = client.SyncComplete(ctx, "test-unit") + require.NoError(t, err) + + // History contains only test-unit's events, in order. + status, err := client.SyncStatus(ctx, "test-unit") + require.NoError(t, err) + require.Len(t, status.History, 3) + for _, ev := range status.History { + require.Equal(t, unit.ID("test-unit"), ev.Unit) + require.Equal(t, unit.EventStatusChange, ev.Kind) + } + require.Equal(t, unit.StatusPending, status.History[0].To) + require.Equal(t, unit.StatusStarted, status.History[1].To) + require.Equal(t, unit.StatusComplete, status.History[2].To) + }) + t.Run("UpdateAppStatus", func(t *testing.T) { t.Parallel() diff --git a/agent/unit/events.go b/agent/unit/events.go new file mode 100644 index 00000000000..add6cbd352d --- /dev/null +++ b/agent/unit/events.go @@ -0,0 +1,40 @@ +package unit + +import "time" + +// EventKind identifies the type of change an Event records. +type EventKind string + +const ( + // EventStatusChange records a unit status transition, including the + // initial registration into StatusPending. + EventStatusChange EventKind = "status_change" + // EventDependencyAdded records a dependency edge added to the graph. + // Dependency declarations are recorded because they can change a + // unit's readiness without a status change, so readiness intervals + // can only be reconstructed if edge additions are part of the log. + EventDependencyAdded EventKind = "dependency_added" +) + +// Event is an immutable record of a change to the dependency graph. +// Events are appended by the Manager under its write lock, so Seq order +// equals Time order within a single Manager. +type Event struct { + // Seq is a monotonic, Manager-global sequence number. + Seq uint64 + // Time is captured from the Manager's clock at the point of the + // change, inside the write lock. It is monotonic-clock-backed. + Time time.Time + Kind EventKind + // Unit is the unit the event applies to. + Unit ID + + // From and To are set for EventStatusChange. From is + // StatusNotRegistered for the registration event. + From Status + To Status + + // DependsOn and RequiredStatus are set for EventDependencyAdded. + DependsOn ID + RequiredStatus Status +} diff --git a/agent/unit/events_test.go b/agent/unit/events_test.go new file mode 100644 index 00000000000..90037d4f116 --- /dev/null +++ b/agent/unit/events_test.go @@ -0,0 +1,175 @@ +package unit_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/coder/coder/v2/agent/unit" + "github.com/coder/quartz" +) + +func TestManager_Events(t *testing.T) { + t.Parallel() + + t.Run("RegisterRecordsStatusChange", func(t *testing.T) { + t.Parallel() + + clock := quartz.NewMock(t) + manager := unit.NewManager(unit.WithClock(clock)) + + require.NoError(t, manager.Register(unitA)) + + events := manager.Events() + require.Len(t, events, 1) + require.Equal(t, unit.EventStatusChange, events[0].Kind) + require.Equal(t, unitA, events[0].Unit) + require.Equal(t, unit.StatusNotRegistered, events[0].From) + require.Equal(t, unit.StatusPending, events[0].To) + require.Equal(t, uint64(1), events[0].Seq) + require.Equal(t, clock.Now(), events[0].Time) + }) + + t.Run("UpdateStatusRecordsTransition", func(t *testing.T) { + t.Parallel() + + clock := quartz.NewMock(t) + manager := unit.NewManager(unit.WithClock(clock)) + + require.NoError(t, manager.Register(unitA)) + clock.Advance(time.Second) + require.NoError(t, manager.UpdateStatus(unitA, unit.StatusStarted)) + clock.Advance(time.Second) + require.NoError(t, manager.UpdateStatus(unitA, unit.StatusComplete)) + + events := manager.Events() + require.Len(t, events, 3) + + require.Equal(t, unit.StatusPending, events[1].From) + require.Equal(t, unit.StatusStarted, events[1].To) + require.Equal(t, unit.StatusStarted, events[2].From) + require.Equal(t, unit.StatusComplete, events[2].To) + + // Seq is strictly increasing and matches time order. + require.Equal(t, uint64(2), events[1].Seq) + require.Equal(t, uint64(3), events[2].Seq) + require.True(t, events[1].Time.Before(events[2].Time)) + }) + + t.Run("RejectedTransitionsNotRecorded", func(t *testing.T) { + t.Parallel() + + manager := unit.NewManager(unit.WithClock(quartz.NewMock(t))) + + require.NoError(t, manager.Register(unitA)) + before := manager.Events() + + // Same-status update is rejected and must not pollute the log. + err := manager.UpdateStatus(unitA, unit.StatusPending) + require.ErrorIs(t, err, unit.ErrSameStatusAlreadySet) + + // Updates to unregistered units are rejected. + err = manager.UpdateStatus(unitB, unit.StatusStarted) + require.ErrorIs(t, err, unit.ErrUnitNotFound) + + // Duplicate registration is rejected. + err = manager.Register(unitA) + require.ErrorIs(t, err, unit.ErrUnitAlreadyRegistered) + + require.Equal(t, before, manager.Events()) + }) + + t.Run("AddDependencyRecordsEvent", func(t *testing.T) { + t.Parallel() + + manager := unit.NewManager(unit.WithClock(quartz.NewMock(t))) + + require.NoError(t, manager.Register(unitA)) + require.NoError(t, manager.AddDependency(unitA, unitB, unit.StatusComplete)) + + events := manager.Events() + require.Len(t, events, 2) + require.Equal(t, unit.EventDependencyAdded, events[1].Kind) + require.Equal(t, unitA, events[1].Unit) + require.Equal(t, unitB, events[1].DependsOn) + require.Equal(t, unit.StatusComplete, events[1].RequiredStatus) + }) + + t.Run("FailedAddDependencyNotRecorded", func(t *testing.T) { + t.Parallel() + + manager := unit.NewManager(unit.WithClock(quartz.NewMock(t))) + + require.NoError(t, manager.Register(unitA)) + require.NoError(t, manager.Register(unitB)) + require.NoError(t, manager.AddDependency(unitA, unitB, unit.StatusComplete)) + before := manager.Events() + + // A dependency that would create a cycle is rejected. + err := manager.AddDependency(unitB, unitA, unit.StatusComplete) + require.ErrorIs(t, err, unit.ErrFailedToAddDependency) + + // A dependency from an unregistered unit is rejected. + err = manager.AddDependency(unitC, unitA, unit.StatusComplete) + require.ErrorIs(t, err, unit.ErrUnitNotFound) + + require.Equal(t, before, manager.Events()) + }) + + t.Run("CrossUnitOrdering", func(t *testing.T) { + t.Parallel() + + clock := quartz.NewMock(t) + manager := unit.NewManager(unit.WithClock(clock)) + + require.NoError(t, manager.Register(unitA)) + clock.Advance(time.Millisecond) + require.NoError(t, manager.Register(unitB)) + clock.Advance(time.Millisecond) + require.NoError(t, manager.AddDependency(unitB, unitA, unit.StatusComplete)) + clock.Advance(time.Millisecond) + require.NoError(t, manager.UpdateStatus(unitA, unit.StatusStarted)) + clock.Advance(time.Millisecond) + require.NoError(t, manager.UpdateStatus(unitA, unit.StatusComplete)) + clock.Advance(time.Millisecond) + require.NoError(t, manager.UpdateStatus(unitB, unit.StatusStarted)) + + events := manager.Events() + require.Len(t, events, 6) + want := uint64(1) + for i, ev := range events { + require.Equal(t, want, ev.Seq) + want++ + if i > 0 { + require.True(t, events[i-1].Time.Before(ev.Time)) + } + } + }) + + t.Run("EventsReturnsCopy", func(t *testing.T) { + t.Parallel() + + manager := unit.NewManager(unit.WithClock(quartz.NewMock(t))) + + require.NoError(t, manager.Register(unitA)) + + events := manager.Events() + events[0].Unit = unitB + + require.Equal(t, unitA, manager.Events()[0].Unit) + }) + + t.Run("DefaultClock", func(t *testing.T) { + t.Parallel() + + // Without WithClock, the Manager uses a real clock. + manager := unit.NewManager() + + require.NoError(t, manager.Register(unitA)) + + events := manager.Events() + require.Len(t, events, 1) + require.False(t, events[0].Time.IsZero()) + }) +} diff --git a/agent/unit/manager.go b/agent/unit/manager.go index 8805abfc7a9..926b05ed565 100644 --- a/agent/unit/manager.go +++ b/agent/unit/manager.go @@ -8,6 +8,7 @@ import ( "golang.org/x/xerrors" "github.com/coder/coder/v2/coderd/util/slice" + "github.com/coder/quartz" ) var ( @@ -86,14 +87,69 @@ type Manager struct { // Store vertex instances for each unit to ensure consistent references units map[ID]Unit + + // clock supplies timestamps for recorded events. Injectable for + // deterministic tests. + clock quartz.Clock + + // events is an append-only log of every successful graph mutation, + // ordered by seq. Timestamps are captured under the write lock, so + // seq order equals time order. + events []Event + seq uint64 +} + +// Option configures a Manager. +type Option func(*Manager) + +// WithClock sets the clock used to timestamp recorded events. +func WithClock(clock quartz.Clock) Option { + return func(m *Manager) { + m.clock = clock + } } // NewManager creates a new Manager instance. -func NewManager() *Manager { - return &Manager{ +func NewManager(opts ...Option) *Manager { + m := &Manager{ graph: &Graph[Status, ID]{}, units: make(map[ID]Unit), + clock: quartz.NewReal(), } + for _, opt := range opts { + opt(m) + } + return m +} + +// maxEvents is a defensive bound on the event log. The status state +// machine is small and finite, so the log stays tiny in practice; the +// cap only guards against unbounded growth if repeated transitions are +// ever permitted. Once reached, further events are dropped rather than +// evicting older ones, because the timeline is only reconstructable +// from a complete prefix of the log. +const maxEvents = 16384 + +// appendEventUnsafe records an event with the next sequence number and +// the current clock time. The caller must hold the write lock. +func (m *Manager) appendEventUnsafe(ev Event) { + if len(m.events) >= maxEvents { + return + } + m.seq++ + ev.Seq = m.seq + ev.Time = m.clock.Now() + m.events = append(m.events, ev) +} + +// Events returns a copy of the full event log, ordered by Seq. +func (m *Manager) Events() []Event { + m.mu.RLock() + defer m.mu.RUnlock() + + events := make([]Event, len(m.events)) + copy(events, m.events) + return events } // Register adds a unit to the manager if it is not already registered. @@ -116,6 +172,13 @@ func (m *Manager) Register(id ID) error { ready: true, } + m.appendEventUnsafe(Event{ + Kind: EventStatusChange, + Unit: id, + From: StatusNotRegistered, + To: StatusPending, + }) + return nil } @@ -175,6 +238,13 @@ func (m *Manager) AddDependency(unit ID, dependsOn ID, requiredStatus Status) er return xerrors.Errorf("adding edge for unit %q: %w", unit, errors.Join(ErrFailedToAddDependency, err)) } + m.appendEventUnsafe(Event{ + Kind: EventDependencyAdded, + Unit: unit, + DependsOn: dependsOn, + RequiredStatus: requiredStatus, + }) + // Recalculate readiness for the unit since it now has a new dependency m.recalculateReadinessUnsafe(unit) @@ -198,9 +268,17 @@ func (m *Manager) UpdateStatus(unit ID, newStatus Status) error { return xerrors.Errorf("checking status for unit %q: %w", unit, ErrSameStatusAlreadySet) } + oldStatus := u.status u.status = newStatus m.units[unit] = u + m.appendEventUnsafe(Event{ + Kind: EventStatusChange, + Unit: unit, + From: oldStatus, + To: newStatus, + }) + // Get all units that depend on this one (reverse adjacent vertices) dependents := m.graph.GetReverseAdjacentVertices(unit) diff --git a/cli/testdata/TestSyncCommands_Golden/status_json_format.golden b/cli/testdata/TestSyncCommands_Golden/status_json_format.golden index d84b2c9d715..3ee12338225 100644 --- a/cli/testdata/TestSyncCommands_Golden/status_json_format.golden +++ b/cli/testdata/TestSyncCommands_Golden/status_json_format.golden @@ -9,5 +9,22 @@ "current_status": "completed", "is_satisfied": true } + ], + "history": [ + { + "seq": 1, + "time": "====[timestamp]=====", + "kind": "status_change", + "unit": "test-unit", + "to": "pending" + }, + { + "seq": 2, + "time": "====[timestamp]=====", + "kind": "dependency_added", + "unit": "test-unit", + "depends_on": "dep-unit", + "required_status": "completed" + } ] } From 34e6342642fcf79bc2afac8f61c1de634b6ba36e Mon Sep 17 00:00:00 2001 From: Sas Swart Date: Sun, 12 Jul 2026 12:44:42 +0000 Subject: [PATCH 2/2] refactor: rename unit event fields for clarity Rename UnitEvent fields to more descriptive names in response to self-review feedback: seq -> sequence_number unit -> unit_id from -> from_status to -> to_status depends_on -> depends_on_unit Applied consistently across the proto wire type, regenerated code, the Go unit.Event domain type, the socket client/service conversions, tests, and the CLI golden output. Also renames the Manager's internal seq counter to sequenceNumber. Coder Agents generated. --- agent/agentsocket/client.go | 20 +- agent/agentsocket/proto/agentsocket.pb.go | 444 +++++++++--------- agent/agentsocket/proto/agentsocket.proto | 20 +- agent/agentsocket/service.go | 12 +- agent/agentsocket/service_test.go | 20 +- agent/unit/events.go | 22 +- agent/unit/events_test.go | 32 +- agent/unit/manager.go | 34 +- .../status_json_format.golden | 12 +- 9 files changed, 310 insertions(+), 306 deletions(-) diff --git a/agent/agentsocket/client.go b/agent/agentsocket/client.go index 975fdd5d5db..7d243cb76ff 100644 --- a/agent/agentsocket/client.go +++ b/agent/agentsocket/client.go @@ -166,13 +166,13 @@ func (c *Client) SyncTimeline(ctx context.Context) ([]UnitEvent, error) { func unitEventFromProto(ev *proto.UnitEvent) UnitEvent { return UnitEvent{ - Seq: ev.GetSeq(), + SequenceNumber: ev.GetSequenceNumber(), Time: ev.GetTime().AsTime(), Kind: unit.EventKind(ev.GetKind()), - Unit: unit.ID(ev.GetUnit()), - From: unit.Status(ev.GetFrom()), - To: unit.Status(ev.GetTo()), - DependsOn: unit.ID(ev.GetDependsOn()), + UnitID: unit.ID(ev.GetUnitId()), + FromStatus: unit.Status(ev.GetFromStatus()), + ToStatus: unit.Status(ev.GetToStatus()), + DependsOnUnit: unit.ID(ev.GetDependsOnUnit()), RequiredStatus: unit.Status(ev.GetRequiredStatus()), } } @@ -314,13 +314,13 @@ type DependencyInfo struct { // UnitEvent is an immutable record of a change to the dependency graph: // either a unit status transition or a dependency declaration. type UnitEvent struct { - Seq uint64 `table:"seq,default_sort" json:"seq"` + SequenceNumber uint64 `table:"sequence_number,default_sort" json:"sequence_number"` Time time.Time `table:"time" json:"time"` Kind unit.EventKind `table:"kind" json:"kind"` - Unit unit.ID `table:"unit" json:"unit"` - From unit.Status `table:"from" json:"from,omitempty"` - To unit.Status `table:"to" json:"to,omitempty"` - DependsOn unit.ID `table:"depends on" json:"depends_on,omitempty"` + UnitID unit.ID `table:"unit" json:"unit_id"` + FromStatus unit.Status `table:"from" json:"from_status,omitempty"` + ToStatus unit.Status `table:"to" json:"to_status,omitempty"` + DependsOnUnit unit.ID `table:"depends on" json:"depends_on_unit,omitempty"` RequiredStatus unit.Status `table:"required status" json:"required_status,omitempty"` } diff --git a/agent/agentsocket/proto/agentsocket.pb.go b/agent/agentsocket/proto/agentsocket.pb.go index 30337332034..38e1e21dbb5 100644 --- a/agent/agentsocket/proto/agentsocket.pb.go +++ b/agent/agentsocket/proto/agentsocket.pb.go @@ -662,19 +662,19 @@ type UnitEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // seq is a monotonic, agent-global sequence number. Within one agent, - // seq order equals time order. - Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` - Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` + // sequence_number is a monotonic, agent-global sequence number. Within one + // agent, sequence_number order equals time order. + SequenceNumber uint64 `protobuf:"varint,1,opt,name=sequence_number,json=sequenceNumber,proto3" json:"sequence_number,omitempty"` + Time *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=time,proto3" json:"time,omitempty"` // kind is "status_change" or "dependency_added". - Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` - Unit string `protobuf:"bytes,4,opt,name=unit,proto3" json:"unit,omitempty"` - // from and to are set for status_change events. from is empty for the - // initial registration event. - From string `protobuf:"bytes,5,opt,name=from,proto3" json:"from,omitempty"` - To string `protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"` - // depends_on and required_status are set for dependency_added events. - DependsOn string `protobuf:"bytes,7,opt,name=depends_on,json=dependsOn,proto3" json:"depends_on,omitempty"` + Kind string `protobuf:"bytes,3,opt,name=kind,proto3" json:"kind,omitempty"` + UnitId string `protobuf:"bytes,4,opt,name=unit_id,json=unitId,proto3" json:"unit_id,omitempty"` + // from_status and to_status are set for status_change events. from_status is + // empty for the initial registration event. + FromStatus string `protobuf:"bytes,5,opt,name=from_status,json=fromStatus,proto3" json:"from_status,omitempty"` + ToStatus string `protobuf:"bytes,6,opt,name=to_status,json=toStatus,proto3" json:"to_status,omitempty"` + // depends_on_unit and required_status are set for dependency_added events. + DependsOnUnit string `protobuf:"bytes,7,opt,name=depends_on_unit,json=dependsOnUnit,proto3" json:"depends_on_unit,omitempty"` RequiredStatus string `protobuf:"bytes,8,opt,name=required_status,json=requiredStatus,proto3" json:"required_status,omitempty"` } @@ -710,9 +710,9 @@ func (*UnitEvent) Descriptor() ([]byte, []int) { return file_agent_agentsocket_proto_agentsocket_proto_rawDescGZIP(), []int{13} } -func (x *UnitEvent) GetSeq() uint64 { +func (x *UnitEvent) GetSequenceNumber() uint64 { if x != nil { - return x.Seq + return x.SequenceNumber } return 0 } @@ -731,30 +731,30 @@ func (x *UnitEvent) GetKind() string { return "" } -func (x *UnitEvent) GetUnit() string { +func (x *UnitEvent) GetUnitId() string { if x != nil { - return x.Unit + return x.UnitId } return "" } -func (x *UnitEvent) GetFrom() string { +func (x *UnitEvent) GetFromStatus() string { if x != nil { - return x.From + return x.FromStatus } return "" } -func (x *UnitEvent) GetTo() string { +func (x *UnitEvent) GetToStatus() string { if x != nil { - return x.To + return x.ToStatus } return "" } -func (x *UnitEvent) GetDependsOn() string { +func (x *UnitEvent) GetDependsOnUnit() string { if x != nil { - return x.DependsOn + return x.DependsOnUnit } return "" } @@ -1842,218 +1842,222 @@ var file_agent_agentsocket_proto_agentsocket_proto_rawDesc = []byte{ 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, - 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xe1, 0x01, 0x0a, 0x09, 0x55, 0x6e, 0x69, - 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x75, 0x6e, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x74, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, - 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, - 0x73, 0x4f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, - 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, - 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, - 0x65, 0x6e, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x19, 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x48, 0x0a, 0x10, 0x53, 0x79, - 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, - 0x0a, 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, - 0x6e, 0x69, 0x74, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x22, 0x57, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xa0, 0x02, 0x0a, 0x09, 0x55, 0x6e, 0x69, + 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, + 0x63, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x74, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x64, 0x65, + 0x70, 0x65, 0x6e, 0x64, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x4f, 0x6e, 0x55, 0x6e, + 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x71, + 0x75, 0x69, 0x72, 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x15, 0x0a, 0x13, 0x53, + 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x14, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x65, 0x76, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, + 0x6e, 0x74, 0x73, 0x22, 0x11, 0x0a, 0x0f, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x08, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x22, 0x48, 0x0a, 0x10, 0x53, 0x79, 0x6e, + 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, + 0x05, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x6e, + 0x69, 0x74, 0x73, 0x22, 0x23, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x57, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, + 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, + 0x68, 0x22, 0x57, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, + 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x07, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x47, 0x65, - 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x22, 0x2d, 0x0a, 0x17, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x22, 0x57, 0x0a, 0x18, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1d, 0x0a, - 0x1b, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x02, 0x0a, - 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, - 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x68, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, - 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, - 0x73, 0x68, 0x6f, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, - 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, - 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, - 0x74, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x15, 0x52, 0x65, 0x73, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, - 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x32, 0x8d, 0x0c, 0x0a, 0x0b, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, + 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x1a, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x1d, 0x0a, 0x1b, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x02, 0x0a, 0x0f, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x69, 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, + 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x5f, 0x65, 0x72, + 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x6e, 0x61, 0x70, 0x73, + 0x68, 0x6f, 0x74, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, + 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, + 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, + 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, + 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x79, + 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x41, 0x0a, 0x08, 0x73, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, + 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x08, 0x73, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x32, 0x8d, 0x0c, 0x0a, 0x0b, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4d, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, + 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x12, 0x25, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, + 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0c, + 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, 0x63, + 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, + 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, + 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, + 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, - 0x63, 0x57, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, - 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x29, 0x2e, + 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, + 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x29, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, - 0x79, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, - 0x64, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x25, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, - 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, - 0x6e, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, - 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x29, - 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x63, 0x6f, 0x64, 0x65, - 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, - 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, - 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x64, + 0x53, 0x79, 0x6e, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x26, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, + 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x32, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x70, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x41, 0x64, 0x64, - 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, - 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x43, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x13, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, - 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2c, - 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, - 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, - 0x70, 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, - 0x68, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x52, - 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, - 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, - 0x76, 0x32, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, - 0x63, 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7a, 0x0a, 0x13, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, + 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x71, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, 0x6f, 0x74, 0x12, 0x2c, 0x2e, + 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, + 0x73, 0x68, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x6e, 0x61, 0x70, 0x73, 0x68, + 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x0d, 0x52, 0x65, + 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2a, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x72, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2e, + 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, + 0x32, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x6f, 0x63, + 0x6b, 0x65, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/agent/agentsocket/proto/agentsocket.proto b/agent/agentsocket/proto/agentsocket.proto index 2cdb0546094..319842058cb 100644 --- a/agent/agentsocket/proto/agentsocket.proto +++ b/agent/agentsocket/proto/agentsocket.proto @@ -62,19 +62,19 @@ message SyncStatusResponse { // UnitEvent is an immutable record of a change to the dependency graph: // either a unit status transition or a dependency declaration. message UnitEvent { - // seq is a monotonic, agent-global sequence number. Within one agent, - // seq order equals time order. - uint64 seq = 1; + // sequence_number is a monotonic, agent-global sequence number. Within one + // agent, sequence_number order equals time order. + uint64 sequence_number = 1; google.protobuf.Timestamp time = 2; // kind is "status_change" or "dependency_added". string kind = 3; - string unit = 4; - // from and to are set for status_change events. from is empty for the - // initial registration event. - string from = 5; - string to = 6; - // depends_on and required_status are set for dependency_added events. - string depends_on = 7; + string unit_id = 4; + // from_status and to_status are set for status_change events. from_status is + // empty for the initial registration event. + string from_status = 5; + string to_status = 6; + // depends_on_unit and required_status are set for dependency_added events. + string depends_on_unit = 7; string required_status = 8; } diff --git a/agent/agentsocket/service.go b/agent/agentsocket/service.go index 7c166837b47..c88630f54ef 100644 --- a/agent/agentsocket/service.go +++ b/agent/agentsocket/service.go @@ -189,7 +189,7 @@ func (s *DRPCAgentSocketService) SyncStatus(_ context.Context, req *proto.SyncSt var history []*proto.UnitEvent for _, ev := range s.unitManager.Events() { - if ev.Unit != unitID { + if ev.UnitID != unitID { continue } history = append(history, unitEventToProto(ev)) @@ -245,13 +245,13 @@ func (s *DRPCAgentSocketService) SyncTimeline(_ context.Context, _ *proto.SyncTi // unitEventToProto converts a unit.Event to its on-wire form. func unitEventToProto(ev unit.Event) *proto.UnitEvent { return &proto.UnitEvent{ - Seq: ev.Seq, + SequenceNumber: ev.SequenceNumber, Time: timestamppb.New(ev.Time), Kind: string(ev.Kind), - Unit: string(ev.Unit), - From: string(ev.From), - To: string(ev.To), - DependsOn: string(ev.DependsOn), + UnitId: string(ev.UnitID), + FromStatus: string(ev.FromStatus), + ToStatus: string(ev.ToStatus), + DependsOnUnit: string(ev.DependsOnUnit), RequiredStatus: string(ev.RequiredStatus), } } diff --git a/agent/agentsocket/service_test.go b/agent/agentsocket/service_test.go index a1513478908..52d6c88bf3c 100644 --- a/agent/agentsocket/service_test.go +++ b/agent/agentsocket/service_test.go @@ -425,16 +425,16 @@ func TestDRPCAgentSocketService(t *testing.T) { got := make([]eventShape, 0, len(events)) wantSeq := uint64(1) for _, ev := range events { - // Seq is contiguous from 1 and matches the response order. - require.Equal(t, wantSeq, ev.Seq) + // SequenceNumber is contiguous from 1 and matches the response order. + require.Equal(t, wantSeq, ev.SequenceNumber) wantSeq++ require.False(t, ev.Time.IsZero()) got = append(got, eventShape{ kind: ev.Kind, - unitID: ev.Unit, - from: ev.From, - to: ev.To, - dependsOn: ev.DependsOn, + unitID: ev.UnitID, + from: ev.FromStatus, + to: ev.ToStatus, + dependsOn: ev.DependsOnUnit, requiredStatus: ev.RequiredStatus, }) } @@ -475,12 +475,12 @@ func TestDRPCAgentSocketService(t *testing.T) { require.NoError(t, err) require.Len(t, status.History, 3) for _, ev := range status.History { - require.Equal(t, unit.ID("test-unit"), ev.Unit) + require.Equal(t, unit.ID("test-unit"), ev.UnitID) require.Equal(t, unit.EventStatusChange, ev.Kind) } - require.Equal(t, unit.StatusPending, status.History[0].To) - require.Equal(t, unit.StatusStarted, status.History[1].To) - require.Equal(t, unit.StatusComplete, status.History[2].To) + require.Equal(t, unit.StatusPending, status.History[0].ToStatus) + require.Equal(t, unit.StatusStarted, status.History[1].ToStatus) + require.Equal(t, unit.StatusComplete, status.History[2].ToStatus) }) t.Run("UpdateAppStatus", func(t *testing.T) { diff --git a/agent/unit/events.go b/agent/unit/events.go index add6cbd352d..9b4e5a833bf 100644 --- a/agent/unit/events.go +++ b/agent/unit/events.go @@ -17,24 +17,24 @@ const ( ) // Event is an immutable record of a change to the dependency graph. -// Events are appended by the Manager under its write lock, so Seq order -// equals Time order within a single Manager. +// Events are appended by the Manager under its write lock, so SequenceNumber +// order equals Time order within a single Manager. type Event struct { - // Seq is a monotonic, Manager-global sequence number. - Seq uint64 + // SequenceNumber is a monotonic, Manager-global sequence number. + SequenceNumber uint64 // Time is captured from the Manager's clock at the point of the // change, inside the write lock. It is monotonic-clock-backed. Time time.Time Kind EventKind - // Unit is the unit the event applies to. - Unit ID + // UnitID is the unit the event applies to. + UnitID ID - // From and To are set for EventStatusChange. From is + // FromStatus and ToStatus are set for EventStatusChange. FromStatus is // StatusNotRegistered for the registration event. - From Status - To Status + FromStatus Status + ToStatus Status - // DependsOn and RequiredStatus are set for EventDependencyAdded. - DependsOn ID + // DependsOnUnit and RequiredStatus are set for EventDependencyAdded. + DependsOnUnit ID RequiredStatus Status } diff --git a/agent/unit/events_test.go b/agent/unit/events_test.go index 90037d4f116..b3c5e03ec59 100644 --- a/agent/unit/events_test.go +++ b/agent/unit/events_test.go @@ -24,10 +24,10 @@ func TestManager_Events(t *testing.T) { events := manager.Events() require.Len(t, events, 1) require.Equal(t, unit.EventStatusChange, events[0].Kind) - require.Equal(t, unitA, events[0].Unit) - require.Equal(t, unit.StatusNotRegistered, events[0].From) - require.Equal(t, unit.StatusPending, events[0].To) - require.Equal(t, uint64(1), events[0].Seq) + require.Equal(t, unitA, events[0].UnitID) + require.Equal(t, unit.StatusNotRegistered, events[0].FromStatus) + require.Equal(t, unit.StatusPending, events[0].ToStatus) + require.Equal(t, uint64(1), events[0].SequenceNumber) require.Equal(t, clock.Now(), events[0].Time) }) @@ -46,14 +46,14 @@ func TestManager_Events(t *testing.T) { events := manager.Events() require.Len(t, events, 3) - require.Equal(t, unit.StatusPending, events[1].From) - require.Equal(t, unit.StatusStarted, events[1].To) - require.Equal(t, unit.StatusStarted, events[2].From) - require.Equal(t, unit.StatusComplete, events[2].To) + require.Equal(t, unit.StatusPending, events[1].FromStatus) + require.Equal(t, unit.StatusStarted, events[1].ToStatus) + require.Equal(t, unit.StatusStarted, events[2].FromStatus) + require.Equal(t, unit.StatusComplete, events[2].ToStatus) - // Seq is strictly increasing and matches time order. - require.Equal(t, uint64(2), events[1].Seq) - require.Equal(t, uint64(3), events[2].Seq) + // SequenceNumber is strictly increasing and matches time order. + require.Equal(t, uint64(2), events[1].SequenceNumber) + require.Equal(t, uint64(3), events[2].SequenceNumber) require.True(t, events[1].Time.Before(events[2].Time)) }) @@ -91,8 +91,8 @@ func TestManager_Events(t *testing.T) { events := manager.Events() require.Len(t, events, 2) require.Equal(t, unit.EventDependencyAdded, events[1].Kind) - require.Equal(t, unitA, events[1].Unit) - require.Equal(t, unitB, events[1].DependsOn) + require.Equal(t, unitA, events[1].UnitID) + require.Equal(t, unitB, events[1].DependsOnUnit) require.Equal(t, unit.StatusComplete, events[1].RequiredStatus) }) @@ -139,7 +139,7 @@ func TestManager_Events(t *testing.T) { require.Len(t, events, 6) want := uint64(1) for i, ev := range events { - require.Equal(t, want, ev.Seq) + require.Equal(t, want, ev.SequenceNumber) want++ if i > 0 { require.True(t, events[i-1].Time.Before(ev.Time)) @@ -155,9 +155,9 @@ func TestManager_Events(t *testing.T) { require.NoError(t, manager.Register(unitA)) events := manager.Events() - events[0].Unit = unitB + events[0].UnitID = unitB - require.Equal(t, unitA, manager.Events()[0].Unit) + require.Equal(t, unitA, manager.Events()[0].UnitID) }) t.Run("DefaultClock", func(t *testing.T) { diff --git a/agent/unit/manager.go b/agent/unit/manager.go index 926b05ed565..0a7f9cb59f3 100644 --- a/agent/unit/manager.go +++ b/agent/unit/manager.go @@ -93,10 +93,10 @@ type Manager struct { clock quartz.Clock // events is an append-only log of every successful graph mutation, - // ordered by seq. Timestamps are captured under the write lock, so - // seq order equals time order. - events []Event - seq uint64 + // ordered by sequence number. Timestamps are captured under the write + // lock, so sequence order equals time order. + events []Event + sequenceNumber uint64 } // Option configures a Manager. @@ -136,13 +136,13 @@ func (m *Manager) appendEventUnsafe(ev Event) { if len(m.events) >= maxEvents { return } - m.seq++ - ev.Seq = m.seq + m.sequenceNumber++ + ev.SequenceNumber = m.sequenceNumber ev.Time = m.clock.Now() m.events = append(m.events, ev) } -// Events returns a copy of the full event log, ordered by Seq. +// Events returns a copy of the full event log, ordered by SequenceNumber. func (m *Manager) Events() []Event { m.mu.RLock() defer m.mu.RUnlock() @@ -173,10 +173,10 @@ func (m *Manager) Register(id ID) error { } m.appendEventUnsafe(Event{ - Kind: EventStatusChange, - Unit: id, - From: StatusNotRegistered, - To: StatusPending, + Kind: EventStatusChange, + UnitID: id, + FromStatus: StatusNotRegistered, + ToStatus: StatusPending, }) return nil @@ -240,8 +240,8 @@ func (m *Manager) AddDependency(unit ID, dependsOn ID, requiredStatus Status) er m.appendEventUnsafe(Event{ Kind: EventDependencyAdded, - Unit: unit, - DependsOn: dependsOn, + UnitID: unit, + DependsOnUnit: dependsOn, RequiredStatus: requiredStatus, }) @@ -273,10 +273,10 @@ func (m *Manager) UpdateStatus(unit ID, newStatus Status) error { m.units[unit] = u m.appendEventUnsafe(Event{ - Kind: EventStatusChange, - Unit: unit, - From: oldStatus, - To: newStatus, + Kind: EventStatusChange, + UnitID: unit, + FromStatus: oldStatus, + ToStatus: newStatus, }) // Get all units that depend on this one (reverse adjacent vertices) diff --git a/cli/testdata/TestSyncCommands_Golden/status_json_format.golden b/cli/testdata/TestSyncCommands_Golden/status_json_format.golden index 3ee12338225..c81f1213a9c 100644 --- a/cli/testdata/TestSyncCommands_Golden/status_json_format.golden +++ b/cli/testdata/TestSyncCommands_Golden/status_json_format.golden @@ -12,18 +12,18 @@ ], "history": [ { - "seq": 1, + "sequence_number": 1, "time": "====[timestamp]=====", "kind": "status_change", - "unit": "test-unit", - "to": "pending" + "unit_id": "test-unit", + "to_status": "pending" }, { - "seq": 2, + "sequence_number": 2, "time": "====[timestamp]=====", "kind": "dependency_added", - "unit": "test-unit", - "depends_on": "dep-unit", + "unit_id": "test-unit", + "depends_on_unit": "dep-unit", "required_status": "completed" } ]