chore: move gRPC API to public

In order for other projects to make use of our APIs, they must not
reside underneath the internal directory. This moves the protobuf
definitions to a top-level "api" directory and scopes them according to
their domain. This change also removes generated code from the gitignore
file so that users don't have to generate the code themseleves.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard 2019-09-16 19:32:45 +00:00
parent 20302eb8f6
commit 6efd6fbe08
51 changed files with 6076 additions and 66 deletions

View File

@ -1,4 +1,5 @@
**
!api
!cmd
!docs
!hack

3
.gitignore vendored
View File

@ -16,9 +16,6 @@ kubeconfig
[._]ss[a-gi-z]
[._]sw[a-p]
# protoc-generated files
*.pb.go
# Go
coverage.txt
.artifacts/

View File

@ -35,32 +35,32 @@ WORKDIR /src
FROM build AS generate-build
WORKDIR /osd
COPY ./internal/app/osd/proto ./proto
COPY ./api/os ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
WORKDIR /trustd
COPY ./internal/app/trustd/proto ./proto
COPY ./api/security ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
WORKDIR /machined
COPY ./internal/app/machined/proto ./proto
COPY ./api/machine ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
WORKDIR /proxyd
COPY ./internal/app/proxyd/proto ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
WORKDIR /ntpd
COPY ./internal/app/ntpd/proto ./proto
COPY ./api/time ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
WORKDIR /networkd
COPY ./internal/app/networkd/proto ./proto
COPY ./api/network ./proto
RUN protoc -I./proto --go_out=plugins=grpc:proto proto/api.proto
FROM scratch AS generate
COPY --from=generate-build /osd/proto/api.pb.go /internal/app/osd/proto/
COPY --from=generate-build /trustd/proto/api.pb.go /internal/app/trustd/proto/
COPY --from=generate-build /machined/proto/api.pb.go /internal/app/machined/proto/
COPY --from=generate-build /osd/proto/api.pb.go /api/os/
COPY --from=generate-build /trustd/proto/api.pb.go /api/security/
COPY --from=generate-build /machined/proto/api.pb.go /api/machine/
COPY --from=generate-build /proxyd/proto/api.pb.go /internal/app/proxyd/proto/
COPY --from=generate-build /ntpd/proto/api.pb.go /internal/app/ntpd/proto/
COPY --from=generate-build /networkd/proto/api.pb.go /internal/app/networkd/proto/
COPY --from=generate-build /ntpd/proto/api.pb.go /api/time/
COPY --from=generate-build /networkd/proto/api.pb.go /api/network/
# The base target provides a container that can be used to build all Talos
# assets.
@ -73,6 +73,7 @@ RUN go mod verify
COPY ./cmd ./cmd
COPY ./pkg ./pkg
COPY ./internal ./internal
COPY --from=generate /api ./api
COPY --from=generate /internal/app ./internal/app
RUN go list -mod=readonly all >/dev/null
RUN ! go mod tidy -v 2>&1 | grep .

1943
api/machine/api.pb.go Normal file

File diff suppressed because it is too large Load Diff

617
api/network/api.pb.go Normal file
View File

@ -0,0 +1,617 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type AddressFamily int32
const (
AddressFamily_AF_UNSPEC AddressFamily = 0
AddressFamily_AF_INET AddressFamily = 2
AddressFamily_IPV4 AddressFamily = 2
AddressFamily_AF_INET6 AddressFamily = 10
AddressFamily_IPV6 AddressFamily = 10
)
var AddressFamily_name = map[int32]string{
0: "AF_UNSPEC",
2: "AF_INET",
// Duplicate value: 2: "IPV4",
10: "AF_INET6",
// Duplicate value: 10: "IPV6",
}
var AddressFamily_value = map[string]int32{
"AF_UNSPEC": 0,
"AF_INET": 2,
"IPV4": 2,
"AF_INET6": 10,
"IPV6": 10,
}
func (x AddressFamily) String() string {
return proto.EnumName(AddressFamily_name, int32(x))
}
func (AddressFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
type RouteProtocol int32
const (
RouteProtocol_RTPROT_UNSPEC RouteProtocol = 0
RouteProtocol_RTPROT_REDIRECT RouteProtocol = 1
RouteProtocol_RTPROT_KERNEL RouteProtocol = 2
RouteProtocol_RTPROT_BOOT RouteProtocol = 3
RouteProtocol_RTPROT_STATIC RouteProtocol = 4
RouteProtocol_RTPROT_GATED RouteProtocol = 8
RouteProtocol_RTPROT_RA RouteProtocol = 9
RouteProtocol_RTPROT_MRT RouteProtocol = 10
RouteProtocol_RTPROT_ZEBRA RouteProtocol = 11
RouteProtocol_RTPROT_BIRD RouteProtocol = 12
RouteProtocol_RTPROT_DNROUTED RouteProtocol = 13
RouteProtocol_RTPROT_XORP RouteProtocol = 14
RouteProtocol_RTPROT_NTK RouteProtocol = 15
RouteProtocol_RTPROT_DHCP RouteProtocol = 16
RouteProtocol_RTPROT_MROUTED RouteProtocol = 17
RouteProtocol_RTPROT_BABEL RouteProtocol = 42
)
var RouteProtocol_name = map[int32]string{
0: "RTPROT_UNSPEC",
1: "RTPROT_REDIRECT",
2: "RTPROT_KERNEL",
3: "RTPROT_BOOT",
4: "RTPROT_STATIC",
8: "RTPROT_GATED",
9: "RTPROT_RA",
10: "RTPROT_MRT",
11: "RTPROT_ZEBRA",
12: "RTPROT_BIRD",
13: "RTPROT_DNROUTED",
14: "RTPROT_XORP",
15: "RTPROT_NTK",
16: "RTPROT_DHCP",
17: "RTPROT_MROUTED",
42: "RTPROT_BABEL",
}
var RouteProtocol_value = map[string]int32{
"RTPROT_UNSPEC": 0,
"RTPROT_REDIRECT": 1,
"RTPROT_KERNEL": 2,
"RTPROT_BOOT": 3,
"RTPROT_STATIC": 4,
"RTPROT_GATED": 8,
"RTPROT_RA": 9,
"RTPROT_MRT": 10,
"RTPROT_ZEBRA": 11,
"RTPROT_BIRD": 12,
"RTPROT_DNROUTED": 13,
"RTPROT_XORP": 14,
"RTPROT_NTK": 15,
"RTPROT_DHCP": 16,
"RTPROT_MROUTED": 17,
"RTPROT_BABEL": 42,
}
func (x RouteProtocol) String() string {
return proto.EnumName(RouteProtocol_name, int32(x))
}
func (RouteProtocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
type InterfaceFlags int32
const (
InterfaceFlags_FLAG_UNKNOWN InterfaceFlags = 0
InterfaceFlags_FLAG_UP InterfaceFlags = 1
InterfaceFlags_FLAG_BROADCAST InterfaceFlags = 2
InterfaceFlags_FLAG_LOOPBACK InterfaceFlags = 3
InterfaceFlags_FLAG_POINT_TO_POINT InterfaceFlags = 4
InterfaceFlags_FLAG_MULTICAST InterfaceFlags = 5
)
var InterfaceFlags_name = map[int32]string{
0: "FLAG_UNKNOWN",
1: "FLAG_UP",
2: "FLAG_BROADCAST",
3: "FLAG_LOOPBACK",
4: "FLAG_POINT_TO_POINT",
5: "FLAG_MULTICAST",
}
var InterfaceFlags_value = map[string]int32{
"FLAG_UNKNOWN": 0,
"FLAG_UP": 1,
"FLAG_BROADCAST": 2,
"FLAG_LOOPBACK": 3,
"FLAG_POINT_TO_POINT": 4,
"FLAG_MULTICAST": 5,
}
func (x InterfaceFlags) String() string {
return proto.EnumName(InterfaceFlags_name, int32(x))
}
func (InterfaceFlags) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
// The response message containing the routes.
type RoutesReply struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RoutesReply) Reset() { *m = RoutesReply{} }
func (m *RoutesReply) String() string { return proto.CompactTextString(m) }
func (*RoutesReply) ProtoMessage() {}
func (*RoutesReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *RoutesReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RoutesReply.Unmarshal(m, b)
}
func (m *RoutesReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RoutesReply.Marshal(b, m, deterministic)
}
func (m *RoutesReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_RoutesReply.Merge(m, src)
}
func (m *RoutesReply) XXX_Size() int {
return xxx_messageInfo_RoutesReply.Size(m)
}
func (m *RoutesReply) XXX_DiscardUnknown() {
xxx_messageInfo_RoutesReply.DiscardUnknown(m)
}
var xxx_messageInfo_RoutesReply proto.InternalMessageInfo
func (m *RoutesReply) GetRoutes() []*Route {
if m != nil {
return m.Routes
}
return nil
}
// The response message containing a route.
type Route struct {
// Interface is the interface over which traffic to this destination should be sent
Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
// Destination is the network prefix CIDR which this route provides
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
// Gateway is the gateway address to which traffic to this destination should be sent
Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"`
// Metric is the priority of the route, where lower metrics have higher priorities
Metric uint32 `protobuf:"varint,4,opt,name=metric,proto3" json:"metric,omitempty"`
// Scope desribes the scope of this route
Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"`
// Source is the source prefix CIDR for the route, if one is defined
Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
// Family is the address family of the route. Currently, the only options are AF_INET (IPV4) and AF_INET6 (IPV6).
Family AddressFamily `protobuf:"varint,7,opt,name=family,proto3,enum=proto.AddressFamily" json:"family,omitempty"`
// Protocol is the protocol by which this route came to be in place
Protocol RouteProtocol `protobuf:"varint,8,opt,name=protocol,proto3,enum=proto.RouteProtocol" json:"protocol,omitempty"`
// Flags indicate any special flags on the route
Flags uint32 `protobuf:"varint,9,opt,name=flags,proto3" json:"flags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Route) Reset() { *m = Route{} }
func (m *Route) String() string { return proto.CompactTextString(m) }
func (*Route) ProtoMessage() {}
func (*Route) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *Route) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Route.Unmarshal(m, b)
}
func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Route.Marshal(b, m, deterministic)
}
func (m *Route) XXX_Merge(src proto.Message) {
xxx_messageInfo_Route.Merge(m, src)
}
func (m *Route) XXX_Size() int {
return xxx_messageInfo_Route.Size(m)
}
func (m *Route) XXX_DiscardUnknown() {
xxx_messageInfo_Route.DiscardUnknown(m)
}
var xxx_messageInfo_Route proto.InternalMessageInfo
func (m *Route) GetInterface() string {
if m != nil {
return m.Interface
}
return ""
}
func (m *Route) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *Route) GetGateway() string {
if m != nil {
return m.Gateway
}
return ""
}
func (m *Route) GetMetric() uint32 {
if m != nil {
return m.Metric
}
return 0
}
func (m *Route) GetScope() uint32 {
if m != nil {
return m.Scope
}
return 0
}
func (m *Route) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *Route) GetFamily() AddressFamily {
if m != nil {
return m.Family
}
return AddressFamily_AF_UNSPEC
}
func (m *Route) GetProtocol() RouteProtocol {
if m != nil {
return m.Protocol
}
return RouteProtocol_RTPROT_UNSPEC
}
func (m *Route) GetFlags() uint32 {
if m != nil {
return m.Flags
}
return 0
}
type InterfacesReply struct {
Interfaces []*Interface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InterfacesReply) Reset() { *m = InterfacesReply{} }
func (m *InterfacesReply) String() string { return proto.CompactTextString(m) }
func (*InterfacesReply) ProtoMessage() {}
func (*InterfacesReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
func (m *InterfacesReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterfacesReply.Unmarshal(m, b)
}
func (m *InterfacesReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterfacesReply.Marshal(b, m, deterministic)
}
func (m *InterfacesReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterfacesReply.Merge(m, src)
}
func (m *InterfacesReply) XXX_Size() int {
return xxx_messageInfo_InterfacesReply.Size(m)
}
func (m *InterfacesReply) XXX_DiscardUnknown() {
xxx_messageInfo_InterfacesReply.DiscardUnknown(m)
}
var xxx_messageInfo_InterfacesReply proto.InternalMessageInfo
func (m *InterfacesReply) GetInterfaces() []*Interface {
if m != nil {
return m.Interfaces
}
return nil
}
// Interface represents a net.Interface
type Interface struct {
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Mtu uint32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Hardwareaddr string `protobuf:"bytes,4,opt,name=hardwareaddr,proto3" json:"hardwareaddr,omitempty"`
Flags InterfaceFlags `protobuf:"varint,5,opt,name=flags,proto3,enum=proto.InterfaceFlags" json:"flags,omitempty"`
Ipaddress []string `protobuf:"bytes,6,rep,name=ipaddress,proto3" json:"ipaddress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Interface) Reset() { *m = Interface{} }
func (m *Interface) String() string { return proto.CompactTextString(m) }
func (*Interface) ProtoMessage() {}
func (*Interface) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{3}
}
func (m *Interface) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Interface.Unmarshal(m, b)
}
func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Interface.Marshal(b, m, deterministic)
}
func (m *Interface) XXX_Merge(src proto.Message) {
xxx_messageInfo_Interface.Merge(m, src)
}
func (m *Interface) XXX_Size() int {
return xxx_messageInfo_Interface.Size(m)
}
func (m *Interface) XXX_DiscardUnknown() {
xxx_messageInfo_Interface.DiscardUnknown(m)
}
var xxx_messageInfo_Interface proto.InternalMessageInfo
func (m *Interface) GetIndex() uint32 {
if m != nil {
return m.Index
}
return 0
}
func (m *Interface) GetMtu() uint32 {
if m != nil {
return m.Mtu
}
return 0
}
func (m *Interface) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Interface) GetHardwareaddr() string {
if m != nil {
return m.Hardwareaddr
}
return ""
}
func (m *Interface) GetFlags() InterfaceFlags {
if m != nil {
return m.Flags
}
return InterfaceFlags_FLAG_UNKNOWN
}
func (m *Interface) GetIpaddress() []string {
if m != nil {
return m.Ipaddress
}
return nil
}
func init() {
proto.RegisterEnum("proto.AddressFamily", AddressFamily_name, AddressFamily_value)
proto.RegisterEnum("proto.RouteProtocol", RouteProtocol_name, RouteProtocol_value)
proto.RegisterEnum("proto.InterfaceFlags", InterfaceFlags_name, InterfaceFlags_value)
proto.RegisterType((*RoutesReply)(nil), "proto.RoutesReply")
proto.RegisterType((*Route)(nil), "proto.Route")
proto.RegisterType((*InterfacesReply)(nil), "proto.InterfacesReply")
proto.RegisterType((*Interface)(nil), "proto.Interface")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 718 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4f, 0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0xcd, 0x4b, 0x44, 0xfd, 0xa1, 0x76,
0x33, 0x1e, 0x59, 0x03, 0xcb, 0xfe, 0x6c, 0xf1, 0x4e, 0x70, 0xc6, 0x41, 0x52, 0x92, 0x97, 0x01,
0x9d, 0xd8, 0x5a, 0xaf, 0xab, 0xdd, 0x25, 0xdd, 0x39, 0x04, 0x85, 0x71, 0x43, 0xdb, 0x76, 0x74,
0xad, 0x3b, 0x40, 0x79, 0xfc, 0x02, 0x8e, 0x18, 0xe5, 0xd8, 0xa6, 0xe5, 0x8e, 0x5d, 0x9b, 0x2f,
0x50, 0x61, 0xb7, 0xff, 0x76, 0x34, 0x74, 0x4d, 0xb6, 0xbf, 0x78, 0xf1, 0x03, 0xca, 0x16, 0x8d,
0x1f, 0xc3, 0xe8, 0x9b, 0x8f, 0xaf, 0xa0, 0xc4, 0x27, 0x0d, 0x3e, 0xe9, 0xf0, 0x89, 0xd4, 0x49,
0x27, 0x52, 0xc7, 0x48, 0x26, 0xd2, 0x29, 0xce, 0x3e, 0x36, 0xf1, 0x6e, 0xde, 0x03, 0x3c, 0x3d,
0xa5, 0x7f, 0xee, 0x3c, 0x79, 0xfe, 0xbb, 0xf2, 0xdd, 0xfa, 0x6b, 0x90, 0x27, 0xe1, 0x82, 0x07,
0xf5, 0xb2, 0xb6, 0x0a, 0xd8, 0xff, 0xe3, 0x48, 0xf7, 0x7c, 0x34, 0x3e, 0x94, 0xd8, 0xe7, 0xf2,
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb7, 0x4b, 0x85, 0x35, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NetworkdClient is the client API for Networkd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NetworkdClient interface {
Routes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RoutesReply, error)
Interfaces(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*InterfacesReply, error)
}
type networkdClient struct {
cc *grpc.ClientConn
}
func NewNetworkdClient(cc *grpc.ClientConn) NetworkdClient {
return &networkdClient{cc}
}
func (c *networkdClient) Routes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RoutesReply, error) {
out := new(RoutesReply)
err := c.cc.Invoke(ctx, "/proto.Networkd/Routes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *networkdClient) Interfaces(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*InterfacesReply, error) {
out := new(InterfacesReply)
err := c.cc.Invoke(ctx, "/proto.Networkd/Interfaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NetworkdServer is the server API for Networkd service.
type NetworkdServer interface {
Routes(context.Context, *empty.Empty) (*RoutesReply, error)
Interfaces(context.Context, *empty.Empty) (*InterfacesReply, error)
}
func RegisterNetworkdServer(s *grpc.Server, srv NetworkdServer) {
s.RegisterService(&_Networkd_serviceDesc, srv)
}
func _Networkd_Routes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NetworkdServer).Routes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Networkd/Routes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NetworkdServer).Routes(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Networkd_Interfaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NetworkdServer).Interfaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Networkd/Interfaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NetworkdServer).Interfaces(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Networkd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Networkd",
HandlerType: (*NetworkdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Routes",
Handler: _Networkd_Routes_Handler,
},
{
MethodName: "Interfaces",
Handler: _Networkd_Interfaces_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

1136
api/os/api.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -36,9 +36,7 @@ message ProcessesRequest {
}
// The response message containing the requested processes.
message ProcessesReply {
repeated Process processes = 1;
}
message ProcessesReply { repeated Process processes = 1; }
// The response message containing the requested processes.
message Process {
@ -59,9 +57,7 @@ message StatsRequest {
}
// The response message containing the requested stats.
message StatsReply {
repeated Stat stats = 1;
}
message StatsReply { repeated Stat stats = 1; }
// The response message containing the requested stat.
message Stat {
@ -93,16 +89,10 @@ message LogsRequest {
}
// The response message containing the requested logs.
message Data {
bytes bytes = 1;
}
message Data { bytes bytes = 1; }
message TopRequest {}
message TopReply {
ProcessList process_list = 1;
}
message TopReply { ProcessList process_list = 1; }
message ProcessList {
bytes bytes = 1;
}
message ProcessList { bytes bytes = 1; }

475
api/security/api.pb.go Normal file
View File

@ -0,0 +1,475 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The request message containing the process name.
type CertificateRequest struct {
Csr []byte `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CertificateRequest) Reset() { *m = CertificateRequest{} }
func (m *CertificateRequest) String() string { return proto.CompactTextString(m) }
func (*CertificateRequest) ProtoMessage() {}
func (*CertificateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *CertificateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertificateRequest.Unmarshal(m, b)
}
func (m *CertificateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertificateRequest.Marshal(b, m, deterministic)
}
func (m *CertificateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertificateRequest.Merge(m, src)
}
func (m *CertificateRequest) XXX_Size() int {
return xxx_messageInfo_CertificateRequest.Size(m)
}
func (m *CertificateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CertificateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CertificateRequest proto.InternalMessageInfo
func (m *CertificateRequest) GetCsr() []byte {
if m != nil {
return m.Csr
}
return nil
}
// The response message containing the requested logs.
type CertificateResponse struct {
Ca []byte `protobuf:"bytes,1,opt,name=ca,proto3" json:"ca,omitempty"`
Crt []byte `protobuf:"bytes,2,opt,name=crt,proto3" json:"crt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CertificateResponse) Reset() { *m = CertificateResponse{} }
func (m *CertificateResponse) String() string { return proto.CompactTextString(m) }
func (*CertificateResponse) ProtoMessage() {}
func (*CertificateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *CertificateResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertificateResponse.Unmarshal(m, b)
}
func (m *CertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertificateResponse.Marshal(b, m, deterministic)
}
func (m *CertificateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertificateResponse.Merge(m, src)
}
func (m *CertificateResponse) XXX_Size() int {
return xxx_messageInfo_CertificateResponse.Size(m)
}
func (m *CertificateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CertificateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CertificateResponse proto.InternalMessageInfo
func (m *CertificateResponse) GetCa() []byte {
if m != nil {
return m.Ca
}
return nil
}
func (m *CertificateResponse) GetCrt() []byte {
if m != nil {
return m.Crt
}
return nil
}
// The request message for reading a file on disk.
type ReadFileRequest struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadFileRequest) Reset() { *m = ReadFileRequest{} }
func (m *ReadFileRequest) String() string { return proto.CompactTextString(m) }
func (*ReadFileRequest) ProtoMessage() {}
func (*ReadFileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
func (m *ReadFileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadFileRequest.Unmarshal(m, b)
}
func (m *ReadFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadFileRequest.Marshal(b, m, deterministic)
}
func (m *ReadFileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadFileRequest.Merge(m, src)
}
func (m *ReadFileRequest) XXX_Size() int {
return xxx_messageInfo_ReadFileRequest.Size(m)
}
func (m *ReadFileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReadFileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReadFileRequest proto.InternalMessageInfo
func (m *ReadFileRequest) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
// The response message for reading a file on disk.
type ReadFileResponse struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadFileResponse) Reset() { *m = ReadFileResponse{} }
func (m *ReadFileResponse) String() string { return proto.CompactTextString(m) }
func (*ReadFileResponse) ProtoMessage() {}
func (*ReadFileResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{3}
}
func (m *ReadFileResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadFileResponse.Unmarshal(m, b)
}
func (m *ReadFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadFileResponse.Marshal(b, m, deterministic)
}
func (m *ReadFileResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadFileResponse.Merge(m, src)
}
func (m *ReadFileResponse) XXX_Size() int {
return xxx_messageInfo_ReadFileResponse.Size(m)
}
func (m *ReadFileResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReadFileResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReadFileResponse proto.InternalMessageInfo
func (m *ReadFileResponse) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// The request message containing the process name.
type WriteFileRequest struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Perm int32 `protobuf:"varint,3,opt,name=perm,proto3" json:"perm,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WriteFileRequest) Reset() { *m = WriteFileRequest{} }
func (m *WriteFileRequest) String() string { return proto.CompactTextString(m) }
func (*WriteFileRequest) ProtoMessage() {}
func (*WriteFileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{4}
}
func (m *WriteFileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WriteFileRequest.Unmarshal(m, b)
}
func (m *WriteFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WriteFileRequest.Marshal(b, m, deterministic)
}
func (m *WriteFileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WriteFileRequest.Merge(m, src)
}
func (m *WriteFileRequest) XXX_Size() int {
return xxx_messageInfo_WriteFileRequest.Size(m)
}
func (m *WriteFileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WriteFileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WriteFileRequest proto.InternalMessageInfo
func (m *WriteFileRequest) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
func (m *WriteFileRequest) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *WriteFileRequest) GetPerm() int32 {
if m != nil {
return m.Perm
}
return 0
}
// The response message containing the requested logs.
type WriteFileResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WriteFileResponse) Reset() { *m = WriteFileResponse{} }
func (m *WriteFileResponse) String() string { return proto.CompactTextString(m) }
func (*WriteFileResponse) ProtoMessage() {}
func (*WriteFileResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{5}
}
func (m *WriteFileResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WriteFileResponse.Unmarshal(m, b)
}
func (m *WriteFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WriteFileResponse.Marshal(b, m, deterministic)
}
func (m *WriteFileResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WriteFileResponse.Merge(m, src)
}
func (m *WriteFileResponse) XXX_Size() int {
return xxx_messageInfo_WriteFileResponse.Size(m)
}
func (m *WriteFileResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WriteFileResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WriteFileResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*CertificateRequest)(nil), "proto.CertificateRequest")
proto.RegisterType((*CertificateResponse)(nil), "proto.CertificateResponse")
proto.RegisterType((*ReadFileRequest)(nil), "proto.ReadFileRequest")
proto.RegisterType((*ReadFileResponse)(nil), "proto.ReadFileResponse")
proto.RegisterType((*WriteFileRequest)(nil), "proto.WriteFileRequest")
proto.RegisterType((*WriteFileResponse)(nil), "proto.WriteFileResponse")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 281 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x4b, 0xc3, 0x40,
0x10, 0xc5, 0x49, 0xfa, 0x87, 0x66, 0x14, 0xad, 0x53, 0xd0, 0x98, 0x83, 0x94, 0x05, 0x4b, 0x4f,
0x3d, 0xe8, 0xc1, 0x83, 0x20, 0x58, 0xc5, 0xa3, 0x94, 0x45, 0x10, 0xbc, 0xad, 0x9b, 0x15, 0x17,
0xac, 0x59, 0x77, 0xa7, 0x9f, 0xd2, 0x2f, 0x25, 0xdd, 0xdd, 0xa4, 0xb5, 0x11, 0x3c, 0xcd, 0x23,
0xf3, 0x7e, 0x2f, 0x99, 0x47, 0x20, 0x13, 0x46, 0xcf, 0x8c, 0xad, 0xa8, 0xc2, 0x9e, 0x1f, 0x6c,
0x02, 0x78, 0xa7, 0x2c, 0xe9, 0x37, 0x2d, 0x05, 0x29, 0xae, 0xbe, 0x56, 0xca, 0x11, 0x0e, 0xa1,
0x23, 0x9d, 0xcd, 0x93, 0x71, 0x32, 0xdd, 0xe7, 0x6b, 0xc9, 0xae, 0x60, 0xf4, 0xcb, 0xe7, 0x4c,
0xf5, 0xe9, 0x14, 0x1e, 0x40, 0x2a, 0x45, 0xf4, 0xa5, 0x52, 0x78, 0xd0, 0x52, 0x9e, 0x46, 0xd0,
0x12, 0x3b, 0x87, 0x43, 0xae, 0x44, 0xf9, 0xa0, 0x3f, 0x9a, 0x74, 0x84, 0xae, 0x11, 0xf4, 0xee,
0xb1, 0x8c, 0x7b, 0xcd, 0x26, 0x30, 0xdc, 0xd8, 0x62, 0x38, 0x42, 0xb7, 0x14, 0x54, 0xc7, 0x7b,
0xcd, 0x1e, 0x61, 0xf8, 0x6c, 0x35, 0xa9, 0x7f, 0xf2, 0x1a, 0x36, 0xdd, 0xb0, 0xde, 0xa7, 0xec,
0x32, 0xef, 0x8c, 0x93, 0x69, 0x8f, 0x7b, 0xcd, 0x46, 0x70, 0xb4, 0x95, 0x17, 0x5e, 0x7c, 0xf1,
0x9d, 0x40, 0xff, 0xc9, 0xae, 0x1c, 0x95, 0x78, 0x0f, 0x7b, 0x5b, 0x77, 0xe3, 0x69, 0x68, 0x6f,
0xd6, 0xee, 0xac, 0x28, 0xfe, 0x5a, 0xc5, 0x4b, 0xae, 0x61, 0x50, 0x5f, 0x87, 0xc7, 0xd1, 0xb7,
0xd3, 0x4a, 0x71, 0xd2, 0x7a, 0x1e, 0xe1, 0x1b, 0xc8, 0x9a, 0x4f, 0xc4, 0xda, 0xb5, 0x5b, 0x42,
0x91, 0xb7, 0x17, 0x81, 0x9f, 0x9f, 0x41, 0x26, 0xab, 0x65, 0x58, 0xcf, 0x07, 0xb7, 0x46, 0x2f,
0xd6, 0x6a, 0x91, 0xbc, 0x84, 0x5f, 0xe0, 0xb5, 0xef, 0xc7, 0xe5, 0x4f, 0x00, 0x00, 0x00, 0xff,
0xff, 0x59, 0x5a, 0x3f, 0x46, 0x1d, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// TrustdClient is the client API for Trustd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TrustdClient interface {
Certificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error)
WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error)
}
type trustdClient struct {
cc *grpc.ClientConn
}
func NewTrustdClient(cc *grpc.ClientConn) TrustdClient {
return &trustdClient{cc}
}
func (c *trustdClient) Certificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
out := new(CertificateResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/Certificate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *trustdClient) ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error) {
out := new(ReadFileResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/ReadFile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *trustdClient) WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error) {
out := new(WriteFileResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/WriteFile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TrustdServer is the server API for Trustd service.
type TrustdServer interface {
Certificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
ReadFile(context.Context, *ReadFileRequest) (*ReadFileResponse, error)
WriteFile(context.Context, *WriteFileRequest) (*WriteFileResponse, error)
}
func RegisterTrustdServer(s *grpc.Server, srv TrustdServer) {
s.RegisterService(&_Trustd_serviceDesc, srv)
}
func _Trustd_Certificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CertificateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).Certificate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/Certificate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).Certificate(ctx, req.(*CertificateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Trustd_ReadFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReadFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).ReadFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/ReadFile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).ReadFile(ctx, req.(*ReadFileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Trustd_WriteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).WriteFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/WriteFile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).WriteFile(ctx, req.(*WriteFileRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Trustd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Trustd",
HandlerType: (*TrustdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Certificate",
Handler: _Trustd_Certificate_Handler,
},
{
MethodName: "ReadFile",
Handler: _Trustd_ReadFile_Handler,
},
{
MethodName: "WriteFile",
Handler: _Trustd_WriteFile_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

262
api/time/api.pb.go Normal file
View File

@ -0,0 +1,262 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The response message containing the ntp server
type TimeRequest struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeRequest) Reset() { *m = TimeRequest{} }
func (m *TimeRequest) String() string { return proto.CompactTextString(m) }
func (*TimeRequest) ProtoMessage() {}
func (*TimeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *TimeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeRequest.Unmarshal(m, b)
}
func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeRequest.Marshal(b, m, deterministic)
}
func (m *TimeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeRequest.Merge(m, src)
}
func (m *TimeRequest) XXX_Size() int {
return xxx_messageInfo_TimeRequest.Size(m)
}
func (m *TimeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TimeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TimeRequest proto.InternalMessageInfo
func (m *TimeRequest) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
// The response message containing the ntp server, time, and offset
type TimeReply struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
Localtime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=localtime,proto3" json:"localtime,omitempty"`
Remotetime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=remotetime,proto3" json:"remotetime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeReply) Reset() { *m = TimeReply{} }
func (m *TimeReply) String() string { return proto.CompactTextString(m) }
func (*TimeReply) ProtoMessage() {}
func (*TimeReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *TimeReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeReply.Unmarshal(m, b)
}
func (m *TimeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeReply.Marshal(b, m, deterministic)
}
func (m *TimeReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeReply.Merge(m, src)
}
func (m *TimeReply) XXX_Size() int {
return xxx_messageInfo_TimeReply.Size(m)
}
func (m *TimeReply) XXX_DiscardUnknown() {
xxx_messageInfo_TimeReply.DiscardUnknown(m)
}
var xxx_messageInfo_TimeReply proto.InternalMessageInfo
func (m *TimeReply) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
func (m *TimeReply) GetLocaltime() *timestamp.Timestamp {
if m != nil {
return m.Localtime
}
return nil
}
func (m *TimeReply) GetRemotetime() *timestamp.Timestamp {
if m != nil {
return m.Remotetime
}
return nil
}
func init() {
proto.RegisterType((*TimeRequest)(nil), "proto.TimeRequest")
proto.RegisterType((*TimeReply)(nil), "proto.TimeReply")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 244 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0x2c, 0xc8, 0xd4,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x52, 0xd2, 0xe9, 0xf9, 0xf9, 0xe9, 0x39,
0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x8d, 0x94,
0x3c, 0xba, 0x64, 0x49, 0x66, 0x6e, 0x6a, 0x71, 0x49, 0x62, 0x6e, 0x01, 0x44, 0x81, 0x92, 0x2a,
0x17, 0x77, 0x48, 0x66, 0x6e, 0x6a, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x18, 0x17,
0x5b, 0x71, 0x6a, 0x51, 0x59, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x94, 0xa7,
0x34, 0x93, 0x91, 0x8b, 0x13, 0xa2, 0xae, 0x20, 0xa7, 0x12, 0x97, 0x2a, 0x21, 0x0b, 0x2e, 0xce,
0x9c, 0xfc, 0xe4, 0xc4, 0x1c, 0x90, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x52, 0x7a,
0x10, 0x17, 0xe8, 0xc1, 0x5c, 0xa0, 0x17, 0x02, 0x73, 0x41, 0x10, 0x42, 0xb1, 0x90, 0x15, 0x17,
0x57, 0x51, 0x6a, 0x6e, 0x7e, 0x49, 0x2a, 0x58, 0x2b, 0x33, 0x41, 0xad, 0x48, 0xaa, 0x8d, 0xb2,
0xb9, 0x58, 0xfc, 0x4a, 0x0a, 0x52, 0x84, 0x0c, 0xb8, 0x58, 0x40, 0x0a, 0x84, 0xc4, 0x30, 0xf4,
0xb9, 0x82, 0x42, 0x44, 0x4a, 0x00, 0x22, 0xa0, 0x87, 0xf0, 0x87, 0x21, 0xc4, 0x53, 0xce, 0x19,
0xa9, 0xc9, 0xd9, 0x42, 0x42, 0x28, 0xd2, 0xe0, 0xe0, 0xc0, 0xd4, 0xe2, 0x24, 0xc7, 0xc5, 0x99,
0x9c, 0x9f, 0x0b, 0x11, 0x76, 0xe2, 0x70, 0x2c, 0xc8, 0x0c, 0x00, 0xb1, 0x02, 0x18, 0xa3, 0x20,
0xb1, 0x91, 0xc4, 0x06, 0xa6, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x98, 0xd1, 0xa5, 0x14,
0xa8, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NtpdClient is the client API for Ntpd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NtpdClient interface {
Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error)
TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error)
}
type ntpdClient struct {
cc *grpc.ClientConn
}
func NewNtpdClient(cc *grpc.ClientConn) NtpdClient {
return &ntpdClient{cc}
}
func (c *ntpdClient) Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/proto.Ntpd/Time", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ntpdClient) TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/proto.Ntpd/TimeCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NtpdServer is the server API for Ntpd service.
type NtpdServer interface {
Time(context.Context, *empty.Empty) (*TimeReply, error)
TimeCheck(context.Context, *TimeRequest) (*TimeReply, error)
}
func RegisterNtpdServer(s *grpc.Server, srv NtpdServer) {
s.RegisterService(&_Ntpd_serviceDesc, srv)
}
func _Ntpd_Time_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NtpdServer).Time(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Ntpd/Time",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NtpdServer).Time(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Ntpd_TimeCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TimeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NtpdServer).TimeCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Ntpd/TimeCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NtpdServer).TimeCheck(ctx, req.(*TimeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Ntpd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Ntpd",
HandlerType: (*NtpdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Time",
Handler: _Ntpd_Time_Handler,
},
{
MethodName: "TimeCheck",
Handler: _Ntpd_TimeCheck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

View File

@ -13,9 +13,9 @@ import (
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/machined/proto"
)
// dfCmd represents the df command.

View File

@ -12,9 +12,9 @@ import (
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/network"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/networkd/proto"
)
// interfacesCmd represents the net interfaces command

View File

@ -13,9 +13,9 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
proto "github.com/talos-systems/talos/api/os"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/osd/proto"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -15,9 +15,9 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
initproto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
initproto "github.com/talos-systems/talos/internal/app/machined/proto"
)
// lsCmd represents the ls command

View File

@ -15,9 +15,9 @@ import (
criconstants "github.com/containerd/cri/pkg/constants"
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/os"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/osd/proto"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -11,9 +11,9 @@ import (
criconstants "github.com/containerd/cri/pkg/constants"
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/os"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/osd/proto"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -12,9 +12,9 @@ import (
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/network"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/networkd/proto"
)
// routesCmd represents the net routes command

View File

@ -13,9 +13,9 @@ import (
"github.com/golang/protobuf/ptypes"
"github.com/spf13/cobra"
initproto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
initproto "github.com/talos-systems/talos/internal/app/machined/proto"
)
// serviceCmd represents the service command

View File

@ -15,9 +15,9 @@ import (
criconstants "github.com/containerd/cri/pkg/constants"
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/os"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/osd/proto"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -13,9 +13,9 @@ import (
"github.com/golang/protobuf/ptypes"
"github.com/spf13/cobra"
proto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
"github.com/talos-systems/talos/internal/app/ntpd/proto"
)
// timeCmd represents the time command

View File

@ -21,11 +21,11 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
initproto "github.com/talos-systems/talos/api/machine"
networkdproto "github.com/talos-systems/talos/api/network"
proto "github.com/talos-systems/talos/api/os"
ntpdproto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/cmd/osctl/pkg/client/config"
initproto "github.com/talos-systems/talos/internal/app/machined/proto"
networkdproto "github.com/talos-systems/talos/internal/app/networkd/proto"
ntpdproto "github.com/talos-systems/talos/internal/app/ntpd/proto"
"github.com/talos-systems/talos/internal/app/osd/proto"
"github.com/talos-systems/talos/pkg/net"
"github.com/talos-systems/talos/pkg/proc"
)

1
go.sum
View File

@ -423,6 +423,7 @@ github.com/russross/blackfriday v0.0.0-20170610170232-067529f716f4/go.mod h1:JO/
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo=
github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=

View File

@ -15,6 +15,13 @@ run:
# include test files or not, default is true
tests: true
# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
# autogenerated files. If it's not please let us know.
skip-files:
- .*\\.pb\\.go$
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"

View File

@ -20,9 +20,9 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/internal/event"
"github.com/talos-systems/talos/internal/app/machined/pkg/system"
"github.com/talos-systems/talos/internal/app/machined/proto"
"github.com/talos-systems/talos/pkg/archiver"
"github.com/talos-systems/talos/pkg/chunker/stream"
"github.com/talos-systems/talos/pkg/constants"

View File

@ -9,11 +9,11 @@ import (
"github.com/pkg/errors"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/internal/install"
"github.com/talos-systems/talos/internal/app/machined/internal/phase"
"github.com/talos-systems/talos/internal/app/machined/internal/platform"
"github.com/talos-systems/talos/internal/app/machined/internal/runtime"
"github.com/talos-systems/talos/internal/app/machined/proto"
"github.com/talos-systems/talos/internal/pkg/kernel"
"github.com/talos-systems/talos/pkg/constants"
"github.com/talos-systems/talos/pkg/userdata"

View File

@ -5,8 +5,8 @@
package sequencer
import (
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/internal/sequencer/v1alpha1"
"github.com/talos-systems/talos/internal/app/machined/proto"
)
// Sequencer describes the boot, shutdown, and upgrade events.

View File

@ -5,6 +5,7 @@
package v1alpha1
import (
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/internal/phase"
"github.com/talos-systems/talos/internal/app/machined/internal/phase/acpi"
"github.com/talos-systems/talos/internal/app/machined/internal/phase/disk"
@ -18,7 +19,6 @@ import (
"github.com/talos-systems/talos/internal/app/machined/internal/phase/sysctls"
"github.com/talos-systems/talos/internal/app/machined/internal/phase/upgrade"
userdatatask "github.com/talos-systems/talos/internal/app/machined/internal/phase/userdata"
"github.com/talos-systems/talos/internal/app/machined/proto"
"github.com/talos-systems/talos/pkg/blockdevice/probe"
"github.com/talos-systems/talos/pkg/constants"
"github.com/talos-systems/talos/pkg/userdata"

View File

@ -12,9 +12,9 @@ import (
"github.com/pkg/errors"
"golang.org/x/sys/unix"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/internal/event"
"github.com/talos-systems/talos/internal/app/machined/internal/sequencer"
"github.com/talos-systems/talos/internal/app/machined/proto"
"github.com/talos-systems/talos/pkg/constants"
"github.com/talos-systems/talos/pkg/proc/reaper"
"github.com/talos-systems/talos/pkg/startup"

View File

@ -9,7 +9,7 @@ import (
"github.com/golang/protobuf/ptypes"
"github.com/talos-systems/talos/internal/app/machined/proto"
proto "github.com/talos-systems/talos/api/machine"
)
// MaxEventsToKeep is maximum number of events to keep per service before dropping old entries

View File

@ -10,7 +10,7 @@ import (
"github.com/golang/protobuf/ptypes"
"github.com/talos-systems/talos/internal/app/machined/proto"
proto "github.com/talos-systems/talos/api/machine"
)
// Status of the healthcheck

View File

@ -13,11 +13,11 @@ import (
"github.com/pkg/errors"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/conditions"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/events"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/health"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/runner"
"github.com/talos-systems/talos/internal/app/machined/proto"
"github.com/talos-systems/talos/pkg/userdata"
)

View File

@ -19,11 +19,11 @@ import (
specs "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
proto "github.com/talos-systems/talos/api/security"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/conditions"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/runner"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/runner/containerd"
"github.com/talos-systems/talos/internal/app/machined/pkg/system/services/kubeadm"
"github.com/talos-systems/talos/internal/app/trustd/proto"
"github.com/talos-systems/talos/pkg/constants"
"github.com/talos-systems/talos/pkg/userdata"
)

View File

@ -22,7 +22,7 @@ import (
"google.golang.org/grpc/status"
kubeadmv1beta2 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2"
"github.com/talos-systems/talos/internal/app/trustd/proto"
proto "github.com/talos-systems/talos/api/security"
"github.com/talos-systems/talos/internal/pkg/cis"
"github.com/talos-systems/talos/pkg/cmd"
"github.com/talos-systems/talos/pkg/constants"

View File

@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/suite"
"gopkg.in/yaml.v2"
"github.com/talos-systems/talos/internal/app/trustd/proto"
proto "github.com/talos-systems/talos/api/security"
"github.com/talos-systems/talos/pkg/constants"
"github.com/talos-systems/talos/pkg/grpc/middleware/auth/basic"
"github.com/talos-systems/talos/pkg/userdata"

View File

@ -14,8 +14,8 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"
proto "github.com/talos-systems/talos/api/network"
"github.com/talos-systems/talos/internal/app/networkd/pkg/networkd"
"github.com/talos-systems/talos/internal/app/networkd/proto"
)
// Registrator is the concrete type that implements the factory.Registrator and

View File

@ -17,8 +17,8 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"
proto "github.com/talos-systems/talos/api/network"
"github.com/talos-systems/talos/internal/app/networkd/pkg/networkd"
"github.com/talos-systems/talos/internal/app/networkd/proto"
"github.com/talos-systems/talos/pkg/grpc/factory"
)

View File

@ -0,0 +1,617 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type AddressFamily int32
const (
AddressFamily_AF_UNSPEC AddressFamily = 0
AddressFamily_AF_INET AddressFamily = 2
AddressFamily_IPV4 AddressFamily = 2
AddressFamily_AF_INET6 AddressFamily = 10
AddressFamily_IPV6 AddressFamily = 10
)
var AddressFamily_name = map[int32]string{
0: "AF_UNSPEC",
2: "AF_INET",
// Duplicate value: 2: "IPV4",
10: "AF_INET6",
// Duplicate value: 10: "IPV6",
}
var AddressFamily_value = map[string]int32{
"AF_UNSPEC": 0,
"AF_INET": 2,
"IPV4": 2,
"AF_INET6": 10,
"IPV6": 10,
}
func (x AddressFamily) String() string {
return proto.EnumName(AddressFamily_name, int32(x))
}
func (AddressFamily) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
type RouteProtocol int32
const (
RouteProtocol_RTPROT_UNSPEC RouteProtocol = 0
RouteProtocol_RTPROT_REDIRECT RouteProtocol = 1
RouteProtocol_RTPROT_KERNEL RouteProtocol = 2
RouteProtocol_RTPROT_BOOT RouteProtocol = 3
RouteProtocol_RTPROT_STATIC RouteProtocol = 4
RouteProtocol_RTPROT_GATED RouteProtocol = 8
RouteProtocol_RTPROT_RA RouteProtocol = 9
RouteProtocol_RTPROT_MRT RouteProtocol = 10
RouteProtocol_RTPROT_ZEBRA RouteProtocol = 11
RouteProtocol_RTPROT_BIRD RouteProtocol = 12
RouteProtocol_RTPROT_DNROUTED RouteProtocol = 13
RouteProtocol_RTPROT_XORP RouteProtocol = 14
RouteProtocol_RTPROT_NTK RouteProtocol = 15
RouteProtocol_RTPROT_DHCP RouteProtocol = 16
RouteProtocol_RTPROT_MROUTED RouteProtocol = 17
RouteProtocol_RTPROT_BABEL RouteProtocol = 42
)
var RouteProtocol_name = map[int32]string{
0: "RTPROT_UNSPEC",
1: "RTPROT_REDIRECT",
2: "RTPROT_KERNEL",
3: "RTPROT_BOOT",
4: "RTPROT_STATIC",
8: "RTPROT_GATED",
9: "RTPROT_RA",
10: "RTPROT_MRT",
11: "RTPROT_ZEBRA",
12: "RTPROT_BIRD",
13: "RTPROT_DNROUTED",
14: "RTPROT_XORP",
15: "RTPROT_NTK",
16: "RTPROT_DHCP",
17: "RTPROT_MROUTED",
42: "RTPROT_BABEL",
}
var RouteProtocol_value = map[string]int32{
"RTPROT_UNSPEC": 0,
"RTPROT_REDIRECT": 1,
"RTPROT_KERNEL": 2,
"RTPROT_BOOT": 3,
"RTPROT_STATIC": 4,
"RTPROT_GATED": 8,
"RTPROT_RA": 9,
"RTPROT_MRT": 10,
"RTPROT_ZEBRA": 11,
"RTPROT_BIRD": 12,
"RTPROT_DNROUTED": 13,
"RTPROT_XORP": 14,
"RTPROT_NTK": 15,
"RTPROT_DHCP": 16,
"RTPROT_MROUTED": 17,
"RTPROT_BABEL": 42,
}
func (x RouteProtocol) String() string {
return proto.EnumName(RouteProtocol_name, int32(x))
}
func (RouteProtocol) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
type InterfaceFlags int32
const (
InterfaceFlags_FLAG_UNKNOWN InterfaceFlags = 0
InterfaceFlags_FLAG_UP InterfaceFlags = 1
InterfaceFlags_FLAG_BROADCAST InterfaceFlags = 2
InterfaceFlags_FLAG_LOOPBACK InterfaceFlags = 3
InterfaceFlags_FLAG_POINT_TO_POINT InterfaceFlags = 4
InterfaceFlags_FLAG_MULTICAST InterfaceFlags = 5
)
var InterfaceFlags_name = map[int32]string{
0: "FLAG_UNKNOWN",
1: "FLAG_UP",
2: "FLAG_BROADCAST",
3: "FLAG_LOOPBACK",
4: "FLAG_POINT_TO_POINT",
5: "FLAG_MULTICAST",
}
var InterfaceFlags_value = map[string]int32{
"FLAG_UNKNOWN": 0,
"FLAG_UP": 1,
"FLAG_BROADCAST": 2,
"FLAG_LOOPBACK": 3,
"FLAG_POINT_TO_POINT": 4,
"FLAG_MULTICAST": 5,
}
func (x InterfaceFlags) String() string {
return proto.EnumName(InterfaceFlags_name, int32(x))
}
func (InterfaceFlags) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
// The response message containing the routes.
type RoutesReply struct {
Routes []*Route `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RoutesReply) Reset() { *m = RoutesReply{} }
func (m *RoutesReply) String() string { return proto.CompactTextString(m) }
func (*RoutesReply) ProtoMessage() {}
func (*RoutesReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *RoutesReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RoutesReply.Unmarshal(m, b)
}
func (m *RoutesReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RoutesReply.Marshal(b, m, deterministic)
}
func (m *RoutesReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_RoutesReply.Merge(m, src)
}
func (m *RoutesReply) XXX_Size() int {
return xxx_messageInfo_RoutesReply.Size(m)
}
func (m *RoutesReply) XXX_DiscardUnknown() {
xxx_messageInfo_RoutesReply.DiscardUnknown(m)
}
var xxx_messageInfo_RoutesReply proto.InternalMessageInfo
func (m *RoutesReply) GetRoutes() []*Route {
if m != nil {
return m.Routes
}
return nil
}
// The response message containing a route.
type Route struct {
// Interface is the interface over which traffic to this destination should be sent
Interface string `protobuf:"bytes,1,opt,name=interface,proto3" json:"interface,omitempty"`
// Destination is the network prefix CIDR which this route provides
Destination string `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
// Gateway is the gateway address to which traffic to this destination should be sent
Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"`
// Metric is the priority of the route, where lower metrics have higher priorities
Metric uint32 `protobuf:"varint,4,opt,name=metric,proto3" json:"metric,omitempty"`
// Scope desribes the scope of this route
Scope uint32 `protobuf:"varint,5,opt,name=scope,proto3" json:"scope,omitempty"`
// Source is the source prefix CIDR for the route, if one is defined
Source string `protobuf:"bytes,6,opt,name=source,proto3" json:"source,omitempty"`
// Family is the address family of the route. Currently, the only options are AF_INET (IPV4) and AF_INET6 (IPV6).
Family AddressFamily `protobuf:"varint,7,opt,name=family,proto3,enum=proto.AddressFamily" json:"family,omitempty"`
// Protocol is the protocol by which this route came to be in place
Protocol RouteProtocol `protobuf:"varint,8,opt,name=protocol,proto3,enum=proto.RouteProtocol" json:"protocol,omitempty"`
// Flags indicate any special flags on the route
Flags uint32 `protobuf:"varint,9,opt,name=flags,proto3" json:"flags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Route) Reset() { *m = Route{} }
func (m *Route) String() string { return proto.CompactTextString(m) }
func (*Route) ProtoMessage() {}
func (*Route) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *Route) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Route.Unmarshal(m, b)
}
func (m *Route) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Route.Marshal(b, m, deterministic)
}
func (m *Route) XXX_Merge(src proto.Message) {
xxx_messageInfo_Route.Merge(m, src)
}
func (m *Route) XXX_Size() int {
return xxx_messageInfo_Route.Size(m)
}
func (m *Route) XXX_DiscardUnknown() {
xxx_messageInfo_Route.DiscardUnknown(m)
}
var xxx_messageInfo_Route proto.InternalMessageInfo
func (m *Route) GetInterface() string {
if m != nil {
return m.Interface
}
return ""
}
func (m *Route) GetDestination() string {
if m != nil {
return m.Destination
}
return ""
}
func (m *Route) GetGateway() string {
if m != nil {
return m.Gateway
}
return ""
}
func (m *Route) GetMetric() uint32 {
if m != nil {
return m.Metric
}
return 0
}
func (m *Route) GetScope() uint32 {
if m != nil {
return m.Scope
}
return 0
}
func (m *Route) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *Route) GetFamily() AddressFamily {
if m != nil {
return m.Family
}
return AddressFamily_AF_UNSPEC
}
func (m *Route) GetProtocol() RouteProtocol {
if m != nil {
return m.Protocol
}
return RouteProtocol_RTPROT_UNSPEC
}
func (m *Route) GetFlags() uint32 {
if m != nil {
return m.Flags
}
return 0
}
type InterfacesReply struct {
Interfaces []*Interface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InterfacesReply) Reset() { *m = InterfacesReply{} }
func (m *InterfacesReply) String() string { return proto.CompactTextString(m) }
func (*InterfacesReply) ProtoMessage() {}
func (*InterfacesReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
func (m *InterfacesReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InterfacesReply.Unmarshal(m, b)
}
func (m *InterfacesReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InterfacesReply.Marshal(b, m, deterministic)
}
func (m *InterfacesReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_InterfacesReply.Merge(m, src)
}
func (m *InterfacesReply) XXX_Size() int {
return xxx_messageInfo_InterfacesReply.Size(m)
}
func (m *InterfacesReply) XXX_DiscardUnknown() {
xxx_messageInfo_InterfacesReply.DiscardUnknown(m)
}
var xxx_messageInfo_InterfacesReply proto.InternalMessageInfo
func (m *InterfacesReply) GetInterfaces() []*Interface {
if m != nil {
return m.Interfaces
}
return nil
}
// Interface represents a net.Interface
type Interface struct {
Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Mtu uint32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Hardwareaddr string `protobuf:"bytes,4,opt,name=hardwareaddr,proto3" json:"hardwareaddr,omitempty"`
Flags InterfaceFlags `protobuf:"varint,5,opt,name=flags,proto3,enum=proto.InterfaceFlags" json:"flags,omitempty"`
Ipaddress []string `protobuf:"bytes,6,rep,name=ipaddress,proto3" json:"ipaddress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Interface) Reset() { *m = Interface{} }
func (m *Interface) String() string { return proto.CompactTextString(m) }
func (*Interface) ProtoMessage() {}
func (*Interface) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{3}
}
func (m *Interface) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Interface.Unmarshal(m, b)
}
func (m *Interface) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Interface.Marshal(b, m, deterministic)
}
func (m *Interface) XXX_Merge(src proto.Message) {
xxx_messageInfo_Interface.Merge(m, src)
}
func (m *Interface) XXX_Size() int {
return xxx_messageInfo_Interface.Size(m)
}
func (m *Interface) XXX_DiscardUnknown() {
xxx_messageInfo_Interface.DiscardUnknown(m)
}
var xxx_messageInfo_Interface proto.InternalMessageInfo
func (m *Interface) GetIndex() uint32 {
if m != nil {
return m.Index
}
return 0
}
func (m *Interface) GetMtu() uint32 {
if m != nil {
return m.Mtu
}
return 0
}
func (m *Interface) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Interface) GetHardwareaddr() string {
if m != nil {
return m.Hardwareaddr
}
return ""
}
func (m *Interface) GetFlags() InterfaceFlags {
if m != nil {
return m.Flags
}
return InterfaceFlags_FLAG_UNKNOWN
}
func (m *Interface) GetIpaddress() []string {
if m != nil {
return m.Ipaddress
}
return nil
}
func init() {
proto.RegisterEnum("proto.AddressFamily", AddressFamily_name, AddressFamily_value)
proto.RegisterEnum("proto.RouteProtocol", RouteProtocol_name, RouteProtocol_value)
proto.RegisterEnum("proto.InterfaceFlags", InterfaceFlags_name, InterfaceFlags_value)
proto.RegisterType((*RoutesReply)(nil), "proto.RoutesReply")
proto.RegisterType((*Route)(nil), "proto.Route")
proto.RegisterType((*InterfacesReply)(nil), "proto.InterfacesReply")
proto.RegisterType((*Interface)(nil), "proto.Interface")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 718 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x4f, 0x6f, 0xda, 0x4e,
0x10, 0xfd, 0x99, 0x7f, 0xc1, 0x03, 0x86, 0xcd, 0x26, 0xbf, 0xd4, 0x4a, 0xab, 0x0a, 0xa1, 0x1e,
0x10, 0xad, 0x48, 0x94, 0x44, 0x39, 0xf5, 0x62, 0x83, 0x49, 0x2d, 0x88, 0xed, 0x6e, 0x4c, 0x5b,
0xe5, 0x82, 0x1c, 0xbc, 0x50, 0xab, 0x80, 0x91, 0x31, 0x4a, 0xb9, 0xf4, 0xd2, 0xcf, 0xd1, 0xcf,
0xd0, 0x5b, 0x3f, 0x5f, 0xe5, 0xdd,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xff, 0x76, 0x34, 0x74, 0x4d, 0xb6, 0xbf, 0x78, 0xf1, 0x03, 0xca, 0x16, 0x8d,
0x1f, 0xc3, 0xe8, 0x9b, 0x8f, 0xaf, 0xa0, 0xc4, 0x27, 0x0d, 0x3e, 0xe9, 0xf0, 0x89, 0xd4, 0x49,
0x27, 0x52, 0xc7, 0x48, 0x26, 0xd2, 0x29, 0xce, 0x3e, 0x36, 0xf1, 0x6e, 0xde, 0x03, 0x3c, 0x3d,
0xa5, 0x7f, 0xee, 0x3c, 0x79, 0xfe, 0xbb, 0xf2, 0xdd, 0xfa, 0x6b, 0x90, 0x27, 0xe1, 0x82, 0x07,
0xf5, 0xb2, 0xb6, 0x0a, 0xd8, 0xff, 0xe3, 0x48, 0xf7, 0x7c, 0x34, 0x3e, 0x94, 0xd8, 0xe7, 0xf2,
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0xb7, 0x4b, 0x85, 0x35, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NetworkdClient is the client API for Networkd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NetworkdClient interface {
Routes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RoutesReply, error)
Interfaces(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*InterfacesReply, error)
}
type networkdClient struct {
cc *grpc.ClientConn
}
func NewNetworkdClient(cc *grpc.ClientConn) NetworkdClient {
return &networkdClient{cc}
}
func (c *networkdClient) Routes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RoutesReply, error) {
out := new(RoutesReply)
err := c.cc.Invoke(ctx, "/proto.Networkd/Routes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *networkdClient) Interfaces(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*InterfacesReply, error) {
out := new(InterfacesReply)
err := c.cc.Invoke(ctx, "/proto.Networkd/Interfaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NetworkdServer is the server API for Networkd service.
type NetworkdServer interface {
Routes(context.Context, *empty.Empty) (*RoutesReply, error)
Interfaces(context.Context, *empty.Empty) (*InterfacesReply, error)
}
func RegisterNetworkdServer(s *grpc.Server, srv NetworkdServer) {
s.RegisterService(&_Networkd_serviceDesc, srv)
}
func _Networkd_Routes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NetworkdServer).Routes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Networkd/Routes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NetworkdServer).Routes(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Networkd_Interfaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NetworkdServer).Interfaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Networkd/Interfaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NetworkdServer).Interfaces(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Networkd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Networkd",
HandlerType: (*NetworkdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Routes",
Handler: _Networkd_Routes_Handler,
},
{
MethodName: "Interfaces",
Handler: _Networkd_Interfaces_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

View File

@ -12,8 +12,8 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/grpc"
proto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/internal/app/ntpd/pkg/ntp"
"github.com/talos-systems/talos/internal/app/ntpd/proto"
)
// Registrator is the concrete type that implements the factory.Registrator and

View File

@ -16,8 +16,8 @@ import (
"github.com/stretchr/testify/suite"
"google.golang.org/grpc"
proto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/internal/app/ntpd/pkg/ntp"
"github.com/talos-systems/talos/internal/app/ntpd/proto"
"github.com/talos-systems/talos/pkg/grpc/factory"
)

View File

@ -0,0 +1,262 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The response message containing the ntp server
type TimeRequest struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeRequest) Reset() { *m = TimeRequest{} }
func (m *TimeRequest) String() string { return proto.CompactTextString(m) }
func (*TimeRequest) ProtoMessage() {}
func (*TimeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *TimeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeRequest.Unmarshal(m, b)
}
func (m *TimeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeRequest.Marshal(b, m, deterministic)
}
func (m *TimeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeRequest.Merge(m, src)
}
func (m *TimeRequest) XXX_Size() int {
return xxx_messageInfo_TimeRequest.Size(m)
}
func (m *TimeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_TimeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_TimeRequest proto.InternalMessageInfo
func (m *TimeRequest) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
// The response message containing the ntp server, time, and offset
type TimeReply struct {
Server string `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
Localtime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=localtime,proto3" json:"localtime,omitempty"`
Remotetime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=remotetime,proto3" json:"remotetime,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeReply) Reset() { *m = TimeReply{} }
func (m *TimeReply) String() string { return proto.CompactTextString(m) }
func (*TimeReply) ProtoMessage() {}
func (*TimeReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *TimeReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeReply.Unmarshal(m, b)
}
func (m *TimeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeReply.Marshal(b, m, deterministic)
}
func (m *TimeReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeReply.Merge(m, src)
}
func (m *TimeReply) XXX_Size() int {
return xxx_messageInfo_TimeReply.Size(m)
}
func (m *TimeReply) XXX_DiscardUnknown() {
xxx_messageInfo_TimeReply.DiscardUnknown(m)
}
var xxx_messageInfo_TimeReply proto.InternalMessageInfo
func (m *TimeReply) GetServer() string {
if m != nil {
return m.Server
}
return ""
}
func (m *TimeReply) GetLocaltime() *timestamp.Timestamp {
if m != nil {
return m.Localtime
}
return nil
}
func (m *TimeReply) GetRemotetime() *timestamp.Timestamp {
if m != nil {
return m.Remotetime
}
return nil
}
func init() {
proto.RegisterType((*TimeRequest)(nil), "proto.TimeRequest")
proto.RegisterType((*TimeReply)(nil), "proto.TimeReply")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 244 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0x2c, 0xc8, 0xd4,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x52, 0xd2, 0xe9, 0xf9, 0xf9, 0xe9, 0x39,
0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x8d, 0x94,
0x3c, 0xba, 0x64, 0x49, 0x66, 0x6e, 0x6a, 0x71, 0x49, 0x62, 0x6e, 0x01, 0x44, 0x81, 0x92, 0x2a,
0x17, 0x77, 0x48, 0x66, 0x6e, 0x6a, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x18, 0x17,
0x5b, 0x71, 0x6a, 0x51, 0x59, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x94, 0xa7,
0x34, 0x93, 0x91, 0x8b, 0x13, 0xa2, 0xae, 0x20, 0xa7, 0x12, 0x97, 0x2a, 0x21, 0x0b, 0x2e, 0xce,
0x9c, 0xfc, 0xe4, 0xc4, 0x1c, 0x90, 0x25, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x52, 0x7a,
0x10, 0x17, 0xe8, 0xc1, 0x5c, 0xa0, 0x17, 0x02, 0x73, 0x41, 0x10, 0x42, 0xb1, 0x90, 0x15, 0x17,
0x57, 0x51, 0x6a, 0x6e, 0x7e, 0x49, 0x2a, 0x58, 0x2b, 0x33, 0x41, 0xad, 0x48, 0xaa, 0x8d, 0xb2,
0xb9, 0x58, 0xfc, 0x4a, 0x0a, 0x52, 0x84, 0x0c, 0xb8, 0x58, 0x40, 0x0a, 0x84, 0xc4, 0x30, 0xf4,
0xb9, 0x82, 0x42, 0x44, 0x4a, 0x00, 0x22, 0xa0, 0x87, 0xf0, 0x87, 0x21, 0xc4, 0x53, 0xce, 0x19,
0xa9, 0xc9, 0xd9, 0x42, 0x42, 0x28, 0xd2, 0xe0, 0xe0, 0xc0, 0xd4, 0xe2, 0x24, 0xc7, 0xc5, 0x99,
0x9c, 0x9f, 0x0b, 0x11, 0x76, 0xe2, 0x70, 0x2c, 0xc8, 0x0c, 0x00, 0xb1, 0x02, 0x18, 0xa3, 0x20,
0xb1, 0x91, 0xc4, 0x06, 0xa6, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x98, 0xd1, 0xa5, 0x14,
0xa8, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// NtpdClient is the client API for Ntpd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NtpdClient interface {
Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error)
TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error)
}
type ntpdClient struct {
cc *grpc.ClientConn
}
func NewNtpdClient(cc *grpc.ClientConn) NtpdClient {
return &ntpdClient{cc}
}
func (c *ntpdClient) Time(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/proto.Ntpd/Time", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *ntpdClient) TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeReply, error) {
out := new(TimeReply)
err := c.cc.Invoke(ctx, "/proto.Ntpd/TimeCheck", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NtpdServer is the server API for Ntpd service.
type NtpdServer interface {
Time(context.Context, *empty.Empty) (*TimeReply, error)
TimeCheck(context.Context, *TimeRequest) (*TimeReply, error)
}
func RegisterNtpdServer(s *grpc.Server, srv NtpdServer) {
s.RegisterService(&_Ntpd_serviceDesc, srv)
}
func _Ntpd_Time_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NtpdServer).Time(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Ntpd/Time",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NtpdServer).Time(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Ntpd_TimeCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TimeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NtpdServer).TimeCheck(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Ntpd/TimeCheck",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NtpdServer).TimeCheck(ctx, req.(*TimeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Ntpd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Ntpd",
HandlerType: (*NtpdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Time",
Handler: _Ntpd_Time_Handler,
},
{
MethodName: "TimeCheck",
Handler: _Ntpd_TimeCheck_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

View File

@ -11,7 +11,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/grpc"
"github.com/talos-systems/talos/internal/app/machined/proto"
proto "github.com/talos-systems/talos/api/machine"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/grpc"
"github.com/talos-systems/talos/internal/app/networkd/proto"
proto "github.com/talos-systems/talos/api/network"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -10,7 +10,7 @@ import (
"github.com/golang/protobuf/ptypes/empty"
"google.golang.org/grpc"
"github.com/talos-systems/talos/internal/app/ntpd/proto"
proto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/pkg/constants"
)

View File

@ -22,10 +22,10 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"
initproto "github.com/talos-systems/talos/internal/app/machined/proto"
networkdproto "github.com/talos-systems/talos/internal/app/networkd/proto"
ntpdproto "github.com/talos-systems/talos/internal/app/ntpd/proto"
"github.com/talos-systems/talos/internal/app/osd/proto"
initproto "github.com/talos-systems/talos/api/machine"
networkdproto "github.com/talos-systems/talos/api/network"
proto "github.com/talos-systems/talos/api/os"
ntpdproto "github.com/talos-systems/talos/api/time"
"github.com/talos-systems/talos/internal/pkg/containers"
"github.com/talos-systems/talos/internal/pkg/containers/containerd"
"github.com/talos-systems/talos/internal/pkg/containers/cri"

View File

@ -0,0 +1,226 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The response message containing the proxyd backend status.
type BackendsReply struct {
Backends []*Backend `protobuf:"bytes,1,rep,name=backends,proto3" json:"backends,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BackendsReply) Reset() { *m = BackendsReply{} }
func (m *BackendsReply) String() string { return proto.CompactTextString(m) }
func (*BackendsReply) ProtoMessage() {}
func (*BackendsReply) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *BackendsReply) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BackendsReply.Unmarshal(m, b)
}
func (m *BackendsReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BackendsReply.Marshal(b, m, deterministic)
}
func (m *BackendsReply) XXX_Merge(src proto.Message) {
xxx_messageInfo_BackendsReply.Merge(m, src)
}
func (m *BackendsReply) XXX_Size() int {
return xxx_messageInfo_BackendsReply.Size(m)
}
func (m *BackendsReply) XXX_DiscardUnknown() {
xxx_messageInfo_BackendsReply.DiscardUnknown(m)
}
var xxx_messageInfo_BackendsReply proto.InternalMessageInfo
func (m *BackendsReply) GetBackends() []*Backend {
if m != nil {
return m.Backends
}
return nil
}
// Backend represents the proxyd backend
type Backend struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Connections uint32 `protobuf:"varint,3,opt,name=connections,proto3" json:"connections,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Backend) Reset() { *m = Backend{} }
func (m *Backend) String() string { return proto.CompactTextString(m) }
func (*Backend) ProtoMessage() {}
func (*Backend) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *Backend) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Backend.Unmarshal(m, b)
}
func (m *Backend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Backend.Marshal(b, m, deterministic)
}
func (m *Backend) XXX_Merge(src proto.Message) {
xxx_messageInfo_Backend.Merge(m, src)
}
func (m *Backend) XXX_Size() int {
return xxx_messageInfo_Backend.Size(m)
}
func (m *Backend) XXX_DiscardUnknown() {
xxx_messageInfo_Backend.DiscardUnknown(m)
}
var xxx_messageInfo_Backend proto.InternalMessageInfo
func (m *Backend) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Backend) GetAddr() string {
if m != nil {
return m.Addr
}
return ""
}
func (m *Backend) GetConnections() uint32 {
if m != nil {
return m.Connections
}
return 0
}
func init() {
proto.RegisterType((*BackendsReply)(nil), "proto.BackendsReply")
proto.RegisterType((*Backend)(nil), "proto.Backend")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 222 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0x2c, 0xc8, 0xd4,
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x52, 0xd2, 0xe9, 0xf9, 0xf9, 0xe9, 0x39,
0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x8d, 0x92,
0x35, 0x17, 0xaf, 0x53, 0x62, 0x72, 0x76, 0x6a, 0x5e, 0x4a, 0x71, 0x50, 0x6a, 0x41, 0x4e, 0xa5,
0x90, 0x16, 0x17, 0x47, 0x12, 0x54, 0x40, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, 0x88, 0x0f, 0xa2,
0x54, 0x0f, 0xaa, 0x2e, 0x08, 0x2e, 0xaf, 0xe4, 0xcf, 0xc5, 0x0e, 0x15, 0x14, 0xe2, 0xe3, 0x62,
0xca, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0xca, 0x4c, 0x11, 0x12, 0xe2, 0x62,
0x49, 0x4c, 0x49, 0x29, 0x92, 0x60, 0x02, 0x8b, 0x80, 0xd9, 0x42, 0x0a, 0x5c, 0xdc, 0xc9, 0xf9,
0x79, 0x79, 0xa9, 0xc9, 0x25, 0x99, 0xf9, 0x79, 0xc5, 0x12, 0xcc, 0x0a, 0x8c, 0x1a, 0xbc, 0x41,
0xc8, 0x42, 0x46, 0x4e, 0x5c, 0x6c, 0x01, 0x45, 0xf9, 0x15, 0x95, 0x29, 0x42, 0x16, 0x5c, 0x1c,
0x30, 0x77, 0x09, 0x89, 0xe9, 0x41, 0x7c, 0xa0, 0x07, 0xf3, 0x81, 0x9e, 0x2b, 0xc8, 0x07, 0x52,
0x22, 0xa8, 0x0e, 0x83, 0x78, 0xc0, 0x49, 0x8e, 0x8b, 0x33, 0x39, 0x3f, 0x17, 0x22, 0xe5, 0xc4,
0xe1, 0x58, 0x90, 0x19, 0x00, 0x62, 0x05, 0x30, 0x46, 0x41, 0x82, 0x23, 0x89, 0x0d, 0x4c, 0x19,
0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x1f, 0xc0, 0xf4, 0x29, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ProxydClient is the client API for Proxyd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ProxydClient interface {
Backends(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BackendsReply, error)
}
type proxydClient struct {
cc *grpc.ClientConn
}
func NewProxydClient(cc *grpc.ClientConn) ProxydClient {
return &proxydClient{cc}
}
func (c *proxydClient) Backends(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*BackendsReply, error) {
out := new(BackendsReply)
err := c.cc.Invoke(ctx, "/proto.Proxyd/Backends", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProxydServer is the server API for Proxyd service.
type ProxydServer interface {
Backends(context.Context, *empty.Empty) (*BackendsReply, error)
}
func RegisterProxydServer(s *grpc.Server, srv ProxydServer) {
s.RegisterService(&_Proxyd_serviceDesc, srv)
}
func _Proxyd_Backends_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ProxydServer).Backends(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Proxyd/Backends",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ProxydServer).Backends(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Proxyd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Proxyd",
HandlerType: (*ProxydServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Backends",
Handler: _Proxyd_Backends_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

View File

@ -13,7 +13,7 @@ import (
"google.golang.org/grpc"
"github.com/talos-systems/talos/internal/app/trustd/proto"
proto "github.com/talos-systems/talos/api/security"
"github.com/talos-systems/talos/pkg/crypto/x509"
"github.com/talos-systems/talos/pkg/userdata"
)

View File

@ -0,0 +1,475 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: api.proto
package proto
import (
context "context"
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// The request message containing the process name.
type CertificateRequest struct {
Csr []byte `protobuf:"bytes,1,opt,name=csr,proto3" json:"csr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CertificateRequest) Reset() { *m = CertificateRequest{} }
func (m *CertificateRequest) String() string { return proto.CompactTextString(m) }
func (*CertificateRequest) ProtoMessage() {}
func (*CertificateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{0}
}
func (m *CertificateRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertificateRequest.Unmarshal(m, b)
}
func (m *CertificateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertificateRequest.Marshal(b, m, deterministic)
}
func (m *CertificateRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertificateRequest.Merge(m, src)
}
func (m *CertificateRequest) XXX_Size() int {
return xxx_messageInfo_CertificateRequest.Size(m)
}
func (m *CertificateRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CertificateRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CertificateRequest proto.InternalMessageInfo
func (m *CertificateRequest) GetCsr() []byte {
if m != nil {
return m.Csr
}
return nil
}
// The response message containing the requested logs.
type CertificateResponse struct {
Ca []byte `protobuf:"bytes,1,opt,name=ca,proto3" json:"ca,omitempty"`
Crt []byte `protobuf:"bytes,2,opt,name=crt,proto3" json:"crt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CertificateResponse) Reset() { *m = CertificateResponse{} }
func (m *CertificateResponse) String() string { return proto.CompactTextString(m) }
func (*CertificateResponse) ProtoMessage() {}
func (*CertificateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{1}
}
func (m *CertificateResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CertificateResponse.Unmarshal(m, b)
}
func (m *CertificateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CertificateResponse.Marshal(b, m, deterministic)
}
func (m *CertificateResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_CertificateResponse.Merge(m, src)
}
func (m *CertificateResponse) XXX_Size() int {
return xxx_messageInfo_CertificateResponse.Size(m)
}
func (m *CertificateResponse) XXX_DiscardUnknown() {
xxx_messageInfo_CertificateResponse.DiscardUnknown(m)
}
var xxx_messageInfo_CertificateResponse proto.InternalMessageInfo
func (m *CertificateResponse) GetCa() []byte {
if m != nil {
return m.Ca
}
return nil
}
func (m *CertificateResponse) GetCrt() []byte {
if m != nil {
return m.Crt
}
return nil
}
// The request message for reading a file on disk.
type ReadFileRequest struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadFileRequest) Reset() { *m = ReadFileRequest{} }
func (m *ReadFileRequest) String() string { return proto.CompactTextString(m) }
func (*ReadFileRequest) ProtoMessage() {}
func (*ReadFileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{2}
}
func (m *ReadFileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadFileRequest.Unmarshal(m, b)
}
func (m *ReadFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadFileRequest.Marshal(b, m, deterministic)
}
func (m *ReadFileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadFileRequest.Merge(m, src)
}
func (m *ReadFileRequest) XXX_Size() int {
return xxx_messageInfo_ReadFileRequest.Size(m)
}
func (m *ReadFileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ReadFileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ReadFileRequest proto.InternalMessageInfo
func (m *ReadFileRequest) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
// The response message for reading a file on disk.
type ReadFileResponse struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReadFileResponse) Reset() { *m = ReadFileResponse{} }
func (m *ReadFileResponse) String() string { return proto.CompactTextString(m) }
func (*ReadFileResponse) ProtoMessage() {}
func (*ReadFileResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{3}
}
func (m *ReadFileResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReadFileResponse.Unmarshal(m, b)
}
func (m *ReadFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReadFileResponse.Marshal(b, m, deterministic)
}
func (m *ReadFileResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReadFileResponse.Merge(m, src)
}
func (m *ReadFileResponse) XXX_Size() int {
return xxx_messageInfo_ReadFileResponse.Size(m)
}
func (m *ReadFileResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ReadFileResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ReadFileResponse proto.InternalMessageInfo
func (m *ReadFileResponse) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
// The request message containing the process name.
type WriteFileRequest struct {
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
Perm int32 `protobuf:"varint,3,opt,name=perm,proto3" json:"perm,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WriteFileRequest) Reset() { *m = WriteFileRequest{} }
func (m *WriteFileRequest) String() string { return proto.CompactTextString(m) }
func (*WriteFileRequest) ProtoMessage() {}
func (*WriteFileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{4}
}
func (m *WriteFileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WriteFileRequest.Unmarshal(m, b)
}
func (m *WriteFileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WriteFileRequest.Marshal(b, m, deterministic)
}
func (m *WriteFileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WriteFileRequest.Merge(m, src)
}
func (m *WriteFileRequest) XXX_Size() int {
return xxx_messageInfo_WriteFileRequest.Size(m)
}
func (m *WriteFileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WriteFileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WriteFileRequest proto.InternalMessageInfo
func (m *WriteFileRequest) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
func (m *WriteFileRequest) GetData() []byte {
if m != nil {
return m.Data
}
return nil
}
func (m *WriteFileRequest) GetPerm() int32 {
if m != nil {
return m.Perm
}
return 0
}
// The response message containing the requested logs.
type WriteFileResponse struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WriteFileResponse) Reset() { *m = WriteFileResponse{} }
func (m *WriteFileResponse) String() string { return proto.CompactTextString(m) }
func (*WriteFileResponse) ProtoMessage() {}
func (*WriteFileResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_00212fb1f9d3bf1c, []int{5}
}
func (m *WriteFileResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WriteFileResponse.Unmarshal(m, b)
}
func (m *WriteFileResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WriteFileResponse.Marshal(b, m, deterministic)
}
func (m *WriteFileResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WriteFileResponse.Merge(m, src)
}
func (m *WriteFileResponse) XXX_Size() int {
return xxx_messageInfo_WriteFileResponse.Size(m)
}
func (m *WriteFileResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WriteFileResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WriteFileResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*CertificateRequest)(nil), "proto.CertificateRequest")
proto.RegisterType((*CertificateResponse)(nil), "proto.CertificateResponse")
proto.RegisterType((*ReadFileRequest)(nil), "proto.ReadFileRequest")
proto.RegisterType((*ReadFileResponse)(nil), "proto.ReadFileResponse")
proto.RegisterType((*WriteFileRequest)(nil), "proto.WriteFileRequest")
proto.RegisterType((*WriteFileResponse)(nil), "proto.WriteFileResponse")
}
func init() { proto.RegisterFile("api.proto", fileDescriptor_00212fb1f9d3bf1c) }
var fileDescriptor_00212fb1f9d3bf1c = []byte{
// 281 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0x4b, 0xc3, 0x40,
0x10, 0xc5, 0x49, 0xfa, 0x87, 0x66, 0x14, 0xad, 0x53, 0xd0, 0x98, 0x83, 0x94, 0x05, 0x4b, 0x4f,
0x3d, 0xe8, 0xc1, 0x83, 0x20, 0x58, 0xc5, 0xa3, 0x94, 0x45, 0x10, 0xbc, 0xad, 0x9b, 0x15, 0x17,
0xac, 0x59, 0x77, 0xa7, 0x9f, 0xd2, 0x2f, 0x25, 0xdd, 0xdd, 0xa4, 0xb5, 0x11, 0x3c, 0xcd, 0x23,
0xf3, 0x7e, 0x2f, 0x99, 0x47, 0x20, 0x13, 0x46, 0xcf, 0x8c, 0xad, 0xa8, 0xc2, 0x9e, 0x1f, 0x6c,
0x02, 0x78, 0xa7, 0x2c, 0xe9, 0x37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0x00, 0xff,
0xff, 0x59, 0x5a, 0x3f, 0x46, 0x1d, 0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// TrustdClient is the client API for Trustd service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TrustdClient interface {
Certificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error)
WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error)
}
type trustdClient struct {
cc *grpc.ClientConn
}
func NewTrustdClient(cc *grpc.ClientConn) TrustdClient {
return &trustdClient{cc}
}
func (c *trustdClient) Certificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
out := new(CertificateResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/Certificate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *trustdClient) ReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error) {
out := new(ReadFileResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/ReadFile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *trustdClient) WriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*WriteFileResponse, error) {
out := new(WriteFileResponse)
err := c.cc.Invoke(ctx, "/proto.Trustd/WriteFile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TrustdServer is the server API for Trustd service.
type TrustdServer interface {
Certificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
ReadFile(context.Context, *ReadFileRequest) (*ReadFileResponse, error)
WriteFile(context.Context, *WriteFileRequest) (*WriteFileResponse, error)
}
func RegisterTrustdServer(s *grpc.Server, srv TrustdServer) {
s.RegisterService(&_Trustd_serviceDesc, srv)
}
func _Trustd_Certificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CertificateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).Certificate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/Certificate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).Certificate(ctx, req.(*CertificateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Trustd_ReadFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReadFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).ReadFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/ReadFile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).ReadFile(ctx, req.(*ReadFileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Trustd_WriteFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteFileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TrustdServer).WriteFile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.Trustd/WriteFile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TrustdServer).WriteFile(ctx, req.(*WriteFileRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Trustd_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.Trustd",
HandlerType: (*TrustdServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Certificate",
Handler: _Trustd_Certificate_Handler,
},
{
MethodName: "ReadFile",
Handler: _Trustd_ReadFile_Handler,
},
{
MethodName: "WriteFile",
Handler: _Trustd_WriteFile_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api.proto",
}

View File

@ -13,7 +13,7 @@ import (
"github.com/hashicorp/go-multierror"
"google.golang.org/grpc"
"github.com/talos-systems/talos/internal/app/trustd/proto"
proto "github.com/talos-systems/talos/api/security"
"github.com/talos-systems/talos/pkg/crypto/x509"
"github.com/talos-systems/talos/pkg/grpc/middleware/auth/basic"
"github.com/talos-systems/talos/pkg/userdata"