This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
log.go
118 lines (91 loc) · 2.87 KB
/
log.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package daemon
import (
"context"
"time"
"github.com/rancher/k3c/pkg/log"
pb "k8s.io/cri-api/pkg/apis/runtime/v1alpha2"
)
type chanWriter struct {
stderr bool
c chan log.Entry
}
func (c *chanWriter) Write(p []byte) (n int, err error) {
c.c <- log.Entry{
Stderr: c.stderr,
Message: p,
}
return len(p), nil
}
type wrapper struct {
ctx context.Context
svc pb.RuntimeServiceServer
}
func (w *wrapper) Version(apiVersion string) (*pb.VersionResponse, error) {
panic("implement me")
}
func (w *wrapper) CreateContainer(podSandboxID string, config *pb.ContainerConfig, sandboxConfig *pb.PodSandboxConfig) (string, error) {
panic("implement me")
}
func (w *wrapper) StartContainer(containerID string) error {
panic("implement me")
}
func (w *wrapper) StopContainer(containerID string, timeout int64) error {
panic("implement me")
}
func (w *wrapper) RemoveContainer(containerID string) error {
panic("implement me")
}
func (w *wrapper) ListContainers(filter *pb.ContainerFilter) ([]*pb.Container, error) {
panic("implement me")
}
func (w *wrapper) ContainerStatus(containerID string) (*pb.ContainerStatus, error) {
resp, err := w.svc.ContainerStatus(w.ctx, &pb.ContainerStatusRequest{
ContainerId: containerID,
})
return resp.GetStatus(), err
}
func (w *wrapper) UpdateContainerResources(containerID string, resources *pb.LinuxContainerResources) error {
panic("implement me")
}
func (w *wrapper) ExecSync(containerID string, cmd []string, timeout time.Duration) (stdout []byte, stderr []byte, err error) {
panic("implement me")
}
func (w *wrapper) Exec(*pb.ExecRequest) (*pb.ExecResponse, error) {
panic("implement me")
}
func (w *wrapper) Attach(req *pb.AttachRequest) (*pb.AttachResponse, error) {
panic("implement me")
}
func (w *wrapper) ReopenContainerLog(ContainerID string) error {
panic("implement me")
}
func (w *wrapper) RunPodSandbox(config *pb.PodSandboxConfig, runtimeHandler string) (string, error) {
panic("implement me")
}
func (w *wrapper) StopPodSandbox(podSandboxID string) error {
panic("implement me")
}
func (w *wrapper) RemovePodSandbox(podSandboxID string) error {
panic("implement me")
}
func (w *wrapper) PodSandboxStatus(podSandboxID string) (*pb.PodSandboxStatus, error) {
panic("implement me")
}
func (w *wrapper) ListPodSandbox(filter *pb.PodSandboxFilter) ([]*pb.PodSandbox, error) {
panic("implement me")
}
func (w *wrapper) PortForward(*pb.PortForwardRequest) (*pb.PortForwardResponse, error) {
panic("implement me")
}
func (w *wrapper) ContainerStats(containerID string) (*pb.ContainerStats, error) {
panic("implement me")
}
func (w *wrapper) ListContainerStats(filter *pb.ContainerStatsFilter) ([]*pb.ContainerStats, error) {
panic("implement me")
}
func (w *wrapper) UpdateRuntimeConfig(runtimeConfig *pb.RuntimeConfig) error {
panic("implement me")
}
func (w *wrapper) Status() (*pb.RuntimeStatus, error) {
panic("implement me")
}