Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not exposed APIReadyCheckFunc to outside of package #1286

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/server/api/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ type ShimNetConf struct {
LogToStderr bool `json:"logToStderr,omitempty"`
}

// Define a type for API readiness check functions
type APIReadyCheckFunc func(string) error
// readyCheckFunc defines a type for API readiness check functions
type readyCheckFunc func(string) error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we call it apiReadyCheckFunc


// CmdAdd implements the CNI spec ADD command handler
func CmdAdd(args *skel.CmdArgs) error {
Expand Down Expand Up @@ -74,7 +74,7 @@ func CmdDel(args *skel.CmdArgs) error {
return nil
}

func postRequest(args *skel.CmdArgs, readinessCheck APIReadyCheckFunc) (*Response, string, error) {
func postRequest(args *skel.CmdArgs, readinessCheck readyCheckFunc) (*Response, string, error) {
multusShimConfig, err := shimConfig(args.StdinData)
if err != nil {
return nil, "", fmt.Errorf("invalid CNI configuration passed to multus-shim: %w", err)
Expand Down
Loading