Skip to content

Commit

Permalink
feature: wrap cri manager to log every cri operation
Browse files Browse the repository at this point in the history
Signed-off-by: YaoZengzeng <[email protected]>
  • Loading branch information
YaoZengzeng committed Mar 15, 2018
1 parent 3764a1e commit 6366e9c
Show file tree
Hide file tree
Showing 2 changed files with 388 additions and 3 deletions.
8 changes: 5 additions & 3 deletions daemon/mgr/cri.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,20 @@ type CriManager struct {
}

// NewCriManager creates a brand new cri manager.
func NewCriManager(config *config.Config, ctrMgr ContainerMgr, imgMgr ImageMgr) (*CriManager, error) {
func NewCriManager(config *config.Config, ctrMgr ContainerMgr, imgMgr ImageMgr) (CriMgr, error) {
streamServer, err := newStreamServer(ctrMgr, streamServerAddress, streamServerPort)
if err != nil {
return nil, fmt.Errorf("failed to create stream server for cri manager: %v", err)
}

return &CriManager{
c := &CriManager{
ContainerMgr: ctrMgr,
ImageMgr: imgMgr,
CniMgr: NewCniManager(&config.CriConfig),
StreamServer: streamServer,
}, nil
}

return NewCriWrapper(c), nil
}

// StreamServerStart starts the stream server of CRI.
Expand Down
Loading

0 comments on commit 6366e9c

Please sign in to comment.