chore: Move data messages to common proto

This is to allows reuse across multiple apis.

Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This commit is contained in:
Brad Beam 2019-11-04 17:44:34 +00:00 committed by Brad Beam
parent 18f5c50a32
commit 3fd8abf426
7 changed files with 284 additions and 278 deletions

View File

@ -49,15 +49,6 @@ type ContainerResponse = os.ContainerResponse
// ContainersReply from public import os/os.proto
type ContainersReply = os.ContainersReply
// Data from public import os/os.proto
type Data = os.Data
// DataResponse from public import os/os.proto
type DataResponse = os.DataResponse
// DataReply from public import os/os.proto
type DataReply = os.DataReply
// LogsRequest from public import os/os.proto
type LogsRequest = os.LogsRequest
@ -295,6 +286,15 @@ const InterfaceFlags_FLAG_MULTICAST = InterfaceFlags(network.InterfaceFlags_FLAG
// NodeMetadata from public import common/common.proto
type NodeMetadata = common.NodeMetadata
// Data from public import common/common.proto
type Data = common.Data
// DataResponse from public import common/common.proto
type DataResponse = common.DataResponse
// DataReply from public import common/common.proto
type DataReply = common.DataReply
// Empty from public import google/protobuf/empty.proto
type Empty = empty.Empty
@ -383,10 +383,10 @@ func (p *ApiProxy) Proxy(ctx context.Context, method string, creds credentials.T
if err != nil {
break
}
resp := &os.DataReply{}
resp := &common.DataReply{}
msgs, err = proxyOSRunner(clients, in, proxyDmesg)
for _, msg := range msgs {
resp.Response = append(resp.Response, msg.(*os.DataReply).Response[0])
resp.Response = append(resp.Response, msg.(*common.DataReply).Response[0])
}
response = resp
case "/os.OS/Kubeconfig":
@ -395,10 +395,10 @@ func (p *ApiProxy) Proxy(ctx context.Context, method string, creds credentials.T
if err != nil {
break
}
resp := &os.DataReply{}
resp := &common.DataReply{}
msgs, err = proxyOSRunner(clients, in, proxyKubeconfig)
for _, msg := range msgs {
resp.Response = append(resp.Response, msg.(*os.DataReply).Response[0])
resp.Response = append(resp.Response, msg.(*common.DataReply).Response[0])
}
response = resp
case "/os.OS/Processes":
@ -1104,11 +1104,11 @@ func (r *Registrator) Containers(ctx context.Context, in *os.ContainersRequest)
return r.OSClient.Containers(ctx, in)
}
func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (*os.DataReply, error) {
func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (*common.DataReply, error) {
return r.OSClient.Dmesg(ctx, in)
}
func (r *Registrator) Kubeconfig(ctx context.Context, in *empty.Empty) (*os.DataReply, error) {
func (r *Registrator) Kubeconfig(ctx context.Context, in *empty.Empty) (*common.DataReply, error) {
return r.OSClient.Kubeconfig(ctx, in)
}
@ -1117,7 +1117,7 @@ func (r *Registrator) Logs(in *os.LogsRequest, srv os.OS_LogsServer) error {
if err != nil {
return err
}
var msg os.Data
var msg common.Data
return copyClientServer(&msg, client, srv)
}
@ -1235,11 +1235,11 @@ func (c *LocalOSClient) Containers(ctx context.Context, in *os.ContainersRequest
return c.OSClient.Containers(ctx, in, opts...)
}
func (c *LocalOSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*os.DataReply, error) {
func (c *LocalOSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error) {
return c.OSClient.Dmesg(ctx, in, opts...)
}
func (c *LocalOSClient) Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*os.DataReply, error) {
func (c *LocalOSClient) Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error) {
return c.OSClient.Kubeconfig(ctx, in, opts...)
}

View File

@ -65,20 +65,167 @@ func (m *NodeMetadata) GetHostname() string {
return ""
}
// The response message containing the requested logs.
type Data struct {
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Data) Reset() { *m = Data{} }
func (m *Data) String() string { return proto.CompactTextString(m) }
func (*Data) ProtoMessage() {}
func (*Data) Descriptor() ([]byte, []int) {
return fileDescriptor_8f954d82c0b891f6, []int{1}
}
func (m *Data) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Data.Unmarshal(m, b)
}
func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Data.Marshal(b, m, deterministic)
}
func (m *Data) XXX_Merge(src proto.Message) {
xxx_messageInfo_Data.Merge(m, src)
}
func (m *Data) XXX_Size() int {
return xxx_messageInfo_Data.Size(m)
}
func (m *Data) XXX_DiscardUnknown() {
xxx_messageInfo_Data.DiscardUnknown(m)
}
var xxx_messageInfo_Data proto.InternalMessageInfo
func (m *Data) GetBytes() []byte {
if m != nil {
return m.Bytes
}
return nil
}
type DataResponse struct {
Metadata *NodeMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Bytes *Data `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataResponse) Reset() { *m = DataResponse{} }
func (m *DataResponse) String() string { return proto.CompactTextString(m) }
func (*DataResponse) ProtoMessage() {}
func (*DataResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_8f954d82c0b891f6, []int{2}
}
func (m *DataResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataResponse.Unmarshal(m, b)
}
func (m *DataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DataResponse.Marshal(b, m, deterministic)
}
func (m *DataResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataResponse.Merge(m, src)
}
func (m *DataResponse) XXX_Size() int {
return xxx_messageInfo_DataResponse.Size(m)
}
func (m *DataResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DataResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DataResponse proto.InternalMessageInfo
func (m *DataResponse) GetMetadata() *NodeMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *DataResponse) GetBytes() *Data {
if m != nil {
return m.Bytes
}
return nil
}
type DataReply struct {
Response []*DataResponse `protobuf:"bytes,1,rep,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataReply) Reset() { *m = DataReply{} }
func (m *DataReply) String() string { return proto.CompactTextString(m) }
func (*DataReply) ProtoMessage() {}
func (*DataReply) Descriptor() ([]byte, []int) {
return fileDescriptor_8f954d82c0b891f6, []int{3}
}
func (m *DataReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataReply.Unmarshal(m, b)
}
func (m *DataReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DataReply.Marshal(b, m, deterministic)
}
func (m *DataReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataReply.Merge(m, src)
}
func (m *DataReply) XXX_Size() int {
return xxx_messageInfo_DataReply.Size(m)
}
func (m *DataReply) XXX_DiscardUnknown() {
xxx_messageInfo_DataReply.DiscardUnknown(m)
}
var xxx_messageInfo_DataReply proto.InternalMessageInfo
func (m *DataReply) GetResponse() []*DataResponse {
if m != nil {
return m.Response
}
return nil
}
func init() {
proto.RegisterType((*NodeMetadata)(nil), "common.NodeMetadata")
proto.RegisterType((*Data)(nil), "common.Data")
proto.RegisterType((*DataResponse)(nil), "common.DataResponse")
proto.RegisterType((*DataReply)(nil), "common.DataReply")
}
func init() { proto.RegisterFile("common/common.proto", fileDescriptor_8f954d82c0b891f6) }
var fileDescriptor_8f954d82c0b891f6 = []byte{
// 122 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0xce, 0xcf, 0xcd,
0xcd, 0xcf, 0xd3, 0x87, 0x50, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x6c, 0x10, 0x9e, 0x92,
0x16, 0x17, 0x8f, 0x5f, 0x7e, 0x4a, 0xaa, 0x6f, 0x6a, 0x49, 0x62, 0x4a, 0x62, 0x49, 0xa2, 0x90,
0x14, 0x17, 0x47, 0x46, 0x7e, 0x71, 0x49, 0x5e, 0x62, 0x6e, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06,
0x67, 0x10, 0x9c, 0xef, 0xa4, 0x1d, 0xa5, 0x99, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c,
0x9f, 0xab, 0x5f, 0x92, 0x98, 0x93, 0x5f, 0xac, 0x5b, 0x5c, 0x59, 0x5c, 0x92, 0x9a, 0x5b, 0x0c,
0xe1, 0xe9, 0x27, 0x16, 0x64, 0x42, 0xad, 0x49, 0x62, 0x03, 0xdb, 0x63, 0x0c, 0x08, 0x00, 0x00,
0xff, 0xff, 0x2b, 0xbb, 0xa5, 0xd9, 0x7e, 0x00, 0x00, 0x00,
// 213 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x39, 0x4f, 0xc4, 0x30,
0x10, 0x85, 0x15, 0x8e, 0xd5, 0xee, 0xe0, 0xca, 0x6c, 0xb1, 0x42, 0x14, 0x91, 0x2b, 0x0e, 0x91,
0x20, 0xa8, 0x69, 0x10, 0x2d, 0x14, 0x2e, 0xe9, 0x1c, 0x62, 0x91, 0x48, 0x71, 0xc6, 0xca, 0x0c,
0x45, 0xfe, 0x3d, 0xf2, 0x91, 0x28, 0x95, 0xf5, 0xe4, 0x4f, 0xef, 0x1b, 0x3d, 0xb8, 0xfe, 0x41,
0xe7, 0x70, 0xac, 0xd3, 0x53, 0xf9, 0x09, 0x19, 0xe5, 0x2e, 0x25, 0xf5, 0x00, 0xe2, 0x0b, 0x5b,
0xfb, 0x69, 0xd9, 0xb4, 0x86, 0x8d, 0xbc, 0x81, 0x7d, 0x87, 0xc4, 0xa3, 0x71, 0xf6, 0x54, 0x94,
0xc5, 0xdd, 0x41, 0xaf, 0x59, 0xdd, 0xc2, 0xc5, 0x47, 0x60, 0x8e, 0x70, 0xd9, 0xcc, 0x6c, 0x29,
0x02, 0x42, 0xa7, 0xa0, 0x5a, 0x10, 0xe1, 0x57, 0x5b, 0xf2, 0x38, 0x92, 0x95, 0xcf, 0xb0, 0x77,
0xb9, 0x35, 0x82, 0x57, 0x2f, 0xc7, 0x2a, 0x9f, 0xb0, 0x35, 0xea, 0x95, 0x92, 0x6a, 0xe9, 0x3d,
0x8b, 0xb8, 0x58, 0xf0, 0x58, 0x9b, 0x2d, 0x6f, 0x70, 0x48, 0x16, 0x3f, 0xcc, 0x41, 0x31, 0x65,
0xdd, 0xa9, 0x28, 0xcf, 0xb7, 0x8a, 0xed, 0x29, 0x7a, 0xa5, 0xde, 0x1f, 0xbf, 0xef, 0x7f, 0x7b,
0xee, 0xfe, 0x9a, 0xc0, 0xd5, 0x6c, 0x06, 0xa4, 0x27, 0x9a, 0x89, 0xad, 0xa3, 0x94, 0x6a, 0xe3,
0xfb, 0xbc, 0x54, 0xb3, 0x8b, 0x53, 0xbd, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xa6, 0x20,
0x8e, 0x41, 0x01, 0x00, 0x00,
}

View File

@ -8,3 +8,17 @@ option go_package = "github.com/talos-systems/talos/api/common";
message NodeMetadata {
string hostname = 1;
}
// The response message containing the requested logs.
message Data {
bytes bytes = 1;
}
message DataResponse {
NodeMetadata metadata = 1;
Data bytes = 2;
}
message DataReply {
repeated DataResponse response = 1;
}

View File

@ -291,144 +291,6 @@ func (m *ContainersReply) GetResponse() []*ContainerResponse {
return nil
}
// The response message containing the requested logs.
type Data struct {
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Data) Reset() { *m = Data{} }
func (m *Data) String() string { return proto.CompactTextString(m) }
func (*Data) ProtoMessage() {}
func (*Data) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{4}
}
func (m *Data) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Data.Unmarshal(m, b)
}
func (m *Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Data.Marshal(b, m, deterministic)
}
func (m *Data) XXX_Merge(src proto.Message) {
xxx_messageInfo_Data.Merge(m, src)
}
func (m *Data) XXX_Size() int {
return xxx_messageInfo_Data.Size(m)
}
func (m *Data) XXX_DiscardUnknown() {
xxx_messageInfo_Data.DiscardUnknown(m)
}
var xxx_messageInfo_Data proto.InternalMessageInfo
func (m *Data) GetBytes() []byte {
if m != nil {
return m.Bytes
}
return nil
}
type DataResponse struct {
Metadata *common.NodeMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Bytes *Data `protobuf:"bytes,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataResponse) Reset() { *m = DataResponse{} }
func (m *DataResponse) String() string { return proto.CompactTextString(m) }
func (*DataResponse) ProtoMessage() {}
func (*DataResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{5}
}
func (m *DataResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataResponse.Unmarshal(m, b)
}
func (m *DataResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DataResponse.Marshal(b, m, deterministic)
}
func (m *DataResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataResponse.Merge(m, src)
}
func (m *DataResponse) XXX_Size() int {
return xxx_messageInfo_DataResponse.Size(m)
}
func (m *DataResponse) XXX_DiscardUnknown() {
xxx_messageInfo_DataResponse.DiscardUnknown(m)
}
var xxx_messageInfo_DataResponse proto.InternalMessageInfo
func (m *DataResponse) GetMetadata() *common.NodeMetadata {
if m != nil {
return m.Metadata
}
return nil
}
func (m *DataResponse) GetBytes() *Data {
if m != nil {
return m.Bytes
}
return nil
}
type DataReply struct {
Response []*DataResponse `protobuf:"bytes,1,rep,name=response,proto3" json:"response,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DataReply) Reset() { *m = DataReply{} }
func (m *DataReply) String() string { return proto.CompactTextString(m) }
func (*DataReply) ProtoMessage() {}
func (*DataReply) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{6}
}
func (m *DataReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataReply.Unmarshal(m, b)
}
func (m *DataReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DataReply.Marshal(b, m, deterministic)
}
func (m *DataReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_DataReply.Merge(m, src)
}
func (m *DataReply) XXX_Size() int {
return xxx_messageInfo_DataReply.Size(m)
}
func (m *DataReply) XXX_DiscardUnknown() {
xxx_messageInfo_DataReply.DiscardUnknown(m)
}
var xxx_messageInfo_DataReply proto.InternalMessageInfo
func (m *DataReply) GetResponse() []*DataResponse {
if m != nil {
return m.Response
}
return nil
}
// The request message containing the process name.
type LogsRequest struct {
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
@ -444,7 +306,7 @@ func (m *LogsRequest) Reset() { *m = LogsRequest{} }
func (m *LogsRequest) String() string { return proto.CompactTextString(m) }
func (*LogsRequest) ProtoMessage() {}
func (*LogsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{7}
return fileDescriptor_b20a722d09fd3254, []int{4}
}
func (m *LogsRequest) XXX_Unmarshal(b []byte) error {
@ -501,7 +363,7 @@ func (m *ProcessesRequest) Reset() { *m = ProcessesRequest{} }
func (m *ProcessesRequest) String() string { return proto.CompactTextString(m) }
func (*ProcessesRequest) ProtoMessage() {}
func (*ProcessesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{8}
return fileDescriptor_b20a722d09fd3254, []int{5}
}
func (m *ProcessesRequest) XXX_Unmarshal(b []byte) error {
@ -537,7 +399,7 @@ func (m *ProcessesReply) Reset() { *m = ProcessesReply{} }
func (m *ProcessesReply) String() string { return proto.CompactTextString(m) }
func (*ProcessesReply) ProtoMessage() {}
func (*ProcessesReply) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{9}
return fileDescriptor_b20a722d09fd3254, []int{6}
}
func (m *ProcessesReply) XXX_Unmarshal(b []byte) error {
@ -581,7 +443,7 @@ func (m *ProcessResponse) Reset() { *m = ProcessResponse{} }
func (m *ProcessResponse) String() string { return proto.CompactTextString(m) }
func (*ProcessResponse) ProtoMessage() {}
func (*ProcessResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{10}
return fileDescriptor_b20a722d09fd3254, []int{7}
}
func (m *ProcessResponse) XXX_Unmarshal(b []byte) error {
@ -640,7 +502,7 @@ func (m *Process) Reset() { *m = Process{} }
func (m *Process) String() string { return proto.CompactTextString(m) }
func (*Process) ProtoMessage() {}
func (*Process) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{11}
return fileDescriptor_b20a722d09fd3254, []int{8}
}
func (m *Process) XXX_Unmarshal(b []byte) error {
@ -751,7 +613,7 @@ func (m *RestartRequest) Reset() { *m = RestartRequest{} }
func (m *RestartRequest) String() string { return proto.CompactTextString(m) }
func (*RestartRequest) ProtoMessage() {}
func (*RestartRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{12}
return fileDescriptor_b20a722d09fd3254, []int{9}
}
func (m *RestartRequest) XXX_Unmarshal(b []byte) error {
@ -808,7 +670,7 @@ func (m *RestartResponse) Reset() { *m = RestartResponse{} }
func (m *RestartResponse) String() string { return proto.CompactTextString(m) }
func (*RestartResponse) ProtoMessage() {}
func (*RestartResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{13}
return fileDescriptor_b20a722d09fd3254, []int{10}
}
func (m *RestartResponse) XXX_Unmarshal(b []byte) error {
@ -852,7 +714,7 @@ func (m *RestartReply) Reset() { *m = RestartReply{} }
func (m *RestartReply) String() string { return proto.CompactTextString(m) }
func (*RestartReply) ProtoMessage() {}
func (*RestartReply) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{14}
return fileDescriptor_b20a722d09fd3254, []int{11}
}
func (m *RestartReply) XXX_Unmarshal(b []byte) error {
@ -898,7 +760,7 @@ func (m *StatsRequest) Reset() { *m = StatsRequest{} }
func (m *StatsRequest) String() string { return proto.CompactTextString(m) }
func (*StatsRequest) ProtoMessage() {}
func (*StatsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{15}
return fileDescriptor_b20a722d09fd3254, []int{12}
}
func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
@ -950,7 +812,7 @@ func (m *StatsResponse) Reset() { *m = StatsResponse{} }
func (m *StatsResponse) String() string { return proto.CompactTextString(m) }
func (*StatsResponse) ProtoMessage() {}
func (*StatsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{16}
return fileDescriptor_b20a722d09fd3254, []int{13}
}
func (m *StatsResponse) XXX_Unmarshal(b []byte) error {
@ -1000,7 +862,7 @@ func (m *StatsReply) Reset() { *m = StatsReply{} }
func (m *StatsReply) String() string { return proto.CompactTextString(m) }
func (*StatsReply) ProtoMessage() {}
func (*StatsReply) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{17}
return fileDescriptor_b20a722d09fd3254, []int{14}
}
func (m *StatsReply) XXX_Unmarshal(b []byte) error {
@ -1049,7 +911,7 @@ func (m *Stat) Reset() { *m = Stat{} }
func (m *Stat) String() string { return proto.CompactTextString(m) }
func (*Stat) ProtoMessage() {}
func (*Stat) Descriptor() ([]byte, []int) {
return fileDescriptor_b20a722d09fd3254, []int{18}
return fileDescriptor_b20a722d09fd3254, []int{15}
}
func (m *Stat) XXX_Unmarshal(b []byte) error {
@ -1122,9 +984,6 @@ func init() {
proto.RegisterType((*Container)(nil), "os.Container")
proto.RegisterType((*ContainerResponse)(nil), "os.ContainerResponse")
proto.RegisterType((*ContainersReply)(nil), "os.ContainersReply")
proto.RegisterType((*Data)(nil), "os.Data")
proto.RegisterType((*DataResponse)(nil), "os.DataResponse")
proto.RegisterType((*DataReply)(nil), "os.DataReply")
proto.RegisterType((*LogsRequest)(nil), "os.LogsRequest")
proto.RegisterType((*ProcessesRequest)(nil), "os.ProcessesRequest")
proto.RegisterType((*ProcessesReply)(nil), "os.ProcessesReply")
@ -1142,64 +1001,61 @@ func init() {
func init() { proto.RegisterFile("os/os.proto", fileDescriptor_b20a722d09fd3254) }
var fileDescriptor_b20a722d09fd3254 = []byte{
// 900 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x5f, 0x73, 0xdb, 0x44,
0x10, 0x47, 0xb2, 0x65, 0x5b, 0xeb, 0xbf, 0xbd, 0xa4, 0x1d, 0xe1, 0x76, 0x3a, 0x41, 0x4c, 0x87,
0xb4, 0x10, 0xbb, 0xa4, 0x0f, 0xc0, 0xc0, 0x0c, 0x93, 0xc6, 0x7d, 0xc8, 0x40, 0x93, 0xce, 0xb5,
0x3c, 0xc0, 0x03, 0xe1, 0x6c, 0x5d, 0x9d, 0x1b, 0x2c, 0xdd, 0xa1, 0x3b, 0x75, 0xf0, 0x37, 0xe1,
0x8d, 0x17, 0xbe, 0x16, 0xdf, 0x85, 0xb9, 0x3f, 0x92, 0xe5, 0xa4, 0xd0, 0xd0, 0x0e, 0x3c, 0xf9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23,
0xb4, 0x25, 0x7b, 0x1b, 0x63, 0xb4, 0x85, 0xe9, 0x03, 0xf7, 0x21, 0x30, 0xea, 0x40, 0xa3, 0x9a,
0x50, 0x2c, 0x79, 0x50, 0x43, 0xc4, 0x6a, 0xfd, 0xf8, 0x2b, 0xfd, 0x2e, 0xa7, 0x1a, 0x24, 0x82,
0x3d, 0x0e, 0xce, 0xe4, 0x91, 0x60, 0xcf, 0xbc, 0x1f, 0xee, 0x2d, 0x99, 0xba, 0x28, 0xe6, 0x5a,
0xc7, 0x53, 0x45, 0x56, 0x5c, 0x1e, 0xc8, 0xb5, 0x54, 0x34, 0x95, 0x76, 0x37, 0x25, 0x82, 0x4d,
0xb9, 0x9c, 0xb7, 0x4c, 0xf6, 0x8f, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x6c, 0xe5, 0x4b, 0x71,
0x6f, 0x09, 0x00, 0x00,
// 853 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x51, 0x6f, 0xdb, 0x36,
0x10, 0x9e, 0x6c, 0xcb, 0xb2, 0xce, 0x89, 0xec, 0x30, 0x6d, 0xa1, 0xb9, 0x43, 0x91, 0x09, 0x28,
0x9a, 0x76, 0x88, 0xd5, 0x79, 0x0f, 0x1d, 0xb0, 0x01, 0x43, 0x1a, 0xf7, 0x21, 0xd8, 0x9a, 0x14,
0x6c, 0xf7, 0xb0, 0x3d, 0x2c, 0xa0, 0x25, 0xd6, 0x21, 0x66, 0x89, 0x9c, 0x48, 0x15, 0xf3, 0x3f,
0xd9, 0xdb, 0x5e, 0xf6, 0xe7, 0xf6, 0x2f, 0x06, 0x92, 0x92, 0x2c, 0xa7, 0xdd, 0xda, 0x04, 0x58,
0x9f, 0x24, 0x7e, 0x77, 0xbc, 0xe3, 0x7d, 0xf7, 0xf1, 0x08, 0x43, 0x2e, 0x63, 0x2e, 0xa7, 0xa2,
0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 0x2c,
0xe6, 0x72, 0xd1, 0x37, 0xa7, 0xff, 0xea, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0xde, 0x4b,
0x15, 0xc0, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -1215,8 +1071,8 @@ const _ = grpc.SupportPackageIsVersion4
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OSClient interface {
Containers(ctx context.Context, in *ContainersRequest, opts ...grpc.CallOption) (*ContainersReply, error)
Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DataReply, error)
Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DataReply, error)
Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error)
Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error)
Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (OS_LogsClient, error)
Processes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProcessesReply, error)
Restart(ctx context.Context, in *RestartRequest, opts ...grpc.CallOption) (*RestartReply, error)
@ -1240,8 +1096,8 @@ func (c *oSClient) Containers(ctx context.Context, in *ContainersRequest, opts .
return out, nil
}
func (c *oSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DataReply, error) {
out := new(DataReply)
func (c *oSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error) {
out := new(common.DataReply)
err := c.cc.Invoke(ctx, "/os.OS/Dmesg", in, out, opts...)
if err != nil {
return nil, err
@ -1249,8 +1105,8 @@ func (c *oSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.Call
return out, nil
}
func (c *oSClient) Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*DataReply, error) {
out := new(DataReply)
func (c *oSClient) Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error) {
out := new(common.DataReply)
err := c.cc.Invoke(ctx, "/os.OS/Kubeconfig", in, out, opts...)
if err != nil {
return nil, err
@ -1274,7 +1130,7 @@ func (c *oSClient) Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallO
}
type OS_LogsClient interface {
Recv() (*Data, error)
Recv() (*common.Data, error)
grpc.ClientStream
}
@ -1282,8 +1138,8 @@ type oSLogsClient struct {
grpc.ClientStream
}
func (x *oSLogsClient) Recv() (*Data, error) {
m := new(Data)
func (x *oSLogsClient) Recv() (*common.Data, error) {
m := new(common.Data)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
@ -1320,8 +1176,8 @@ func (c *oSClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.Cal
// OSServer is the server API for OS service.
type OSServer interface {
Containers(context.Context, *ContainersRequest) (*ContainersReply, error)
Dmesg(context.Context, *empty.Empty) (*DataReply, error)
Kubeconfig(context.Context, *empty.Empty) (*DataReply, error)
Dmesg(context.Context, *empty.Empty) (*common.DataReply, error)
Kubeconfig(context.Context, *empty.Empty) (*common.DataReply, error)
Logs(*LogsRequest, OS_LogsServer) error
Processes(context.Context, *empty.Empty) (*ProcessesReply, error)
Restart(context.Context, *RestartRequest) (*RestartReply, error)
@ -1395,7 +1251,7 @@ func _OS_Logs_Handler(srv interface{}, stream grpc.ServerStream) error {
}
type OS_LogsServer interface {
Send(*Data) error
Send(*common.Data) error
grpc.ServerStream
}
@ -1403,7 +1259,7 @@ type oSLogsServer struct {
grpc.ServerStream
}
func (x *oSLogsServer) Send(m *Data) error {
func (x *oSLogsServer) Send(m *common.Data) error {
return x.ServerStream.SendMsg(m)
}

View File

@ -15,9 +15,9 @@ import "common/common.proto";
// OS Service also implements all the API of Init Service
service OS {
rpc Containers(ContainersRequest) returns (ContainersReply);
rpc Dmesg(google.protobuf.Empty) returns (DataReply);
rpc Kubeconfig(google.protobuf.Empty) returns (DataReply);
rpc Logs(LogsRequest) returns (stream Data);
rpc Dmesg(google.protobuf.Empty) returns (common.DataReply);
rpc Kubeconfig(google.protobuf.Empty) returns (common.DataReply);
rpc Logs(LogsRequest) returns (stream common.Data);
rpc Processes(google.protobuf.Empty) returns (ProcessesReply);
rpc Restart(RestartRequest) returns (RestartReply);
rpc Stats(StatsRequest) returns (StatsReply);
@ -61,19 +61,6 @@ message ContainersReply {
// rpc dmesg
// rpc kubeconfig
// The response message containing the requested logs.
message Data {
bytes bytes = 1;
}
message DataResponse {
common.NodeMetadata metadata = 1;
Data bytes = 2;
}
message DataReply {
repeated DataResponse response = 1;
}
// rpc logs

View File

@ -19,6 +19,7 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
"github.com/talos-systems/talos/api/common"
machineapi "github.com/talos-systems/talos/api/machine"
networkapi "github.com/talos-systems/talos/api/network"
osapi "github.com/talos-systems/talos/api/os"
@ -145,7 +146,7 @@ func (c *Client) Close() error {
}
// Kubeconfig implements the proto.OSClient interface.
func (c *Client) Kubeconfig(ctx context.Context) (*osapi.DataReply, error) {
func (c *Client) Kubeconfig(ctx context.Context) (*common.DataReply, error) {
return c.client.Kubeconfig(ctx, &empty.Empty{})
}
@ -199,7 +200,7 @@ func (c *Client) Shutdown(ctx context.Context) (err error) {
}
// Dmesg implements the proto.OSClient interface.
func (c *Client) Dmesg(ctx context.Context) (*osapi.DataReply, error) {
func (c *Client) Dmesg(ctx context.Context) (*common.DataReply, error) {
return c.client.Dmesg(ctx, &empty.Empty{})
}

View File

@ -23,6 +23,7 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"
"github.com/talos-systems/talos/api/common"
osapi "github.com/talos-systems/talos/api/os"
"github.com/talos-systems/talos/internal/pkg/containers"
"github.com/talos-systems/talos/internal/pkg/containers/containerd"
@ -43,7 +44,7 @@ func (r *Registrator) Register(s *grpc.Server) {
}
// Kubeconfig implements the osapi.OSDServer interface.
func (r *Registrator) Kubeconfig(ctx context.Context, in *empty.Empty) (data *osapi.DataReply, err error) {
func (r *Registrator) Kubeconfig(ctx context.Context, in *empty.Empty) (data *common.DataReply, err error) {
var fileBytes []byte
err = retry.Constant(5*time.Minute, retry.WithUnits(5*time.Second)).Retry(func() error {
@ -63,10 +64,10 @@ func (r *Registrator) Kubeconfig(ctx context.Context, in *empty.Empty) (data *os
return
}
data = &osapi.DataReply{
Response: []*osapi.DataResponse{
data = &common.DataReply{
Response: []*common.DataResponse{
{
Bytes: &osapi.Data{Bytes: fileBytes},
Bytes: &common.Data{Bytes: fileBytes},
},
},
}
@ -203,7 +204,7 @@ func (r *Registrator) Restart(ctx context.Context, in *osapi.RestartRequest) (*o
// to read from the ring buffer at /proc/kmsg by taking the
// SYSLOG_ACTION_READ_ALL action. This action reads all messages remaining in
// the ring buffer non-destructively.
func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (data *osapi.DataReply, err error) {
func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (data *common.DataReply, err error) {
// Return the size of the kernel ring buffer
size, err := unix.Klogctl(constants.SYSLOG_ACTION_SIZE_BUFFER, nil)
if err != nil {
@ -217,10 +218,10 @@ func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (data *osapi.D
return
}
data = &osapi.DataReply{
Response: []*osapi.DataResponse{
data = &common.DataReply{
Response: []*common.DataResponse{
{
Bytes: &osapi.Data{Bytes: buf[:n]},
Bytes: &common.Data{Bytes: buf[:n]},
},
},
}
@ -259,7 +260,7 @@ func (r *Registrator) Logs(req *osapi.LogsRequest, l osapi.OS_LogsServer) (err e
}
for data := range chunk.Read(l.Context()) {
if err = l.Send(&osapi.Data{Bytes: data}); err != nil {
if err = l.Send(&common.Data{Bytes: data}); err != nil {
return
}
}