mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-07 19:25:13 +00:00
Merge pull request #1286 from s1061123/fix-type-scope-comment
Not exposed APIReadyCheckFunc to outside of package
This commit is contained in:
commit
4757be12ac
@ -40,8 +40,8 @@ type ShimNetConf struct {
|
|||||||
LogToStderr bool `json:"logToStderr,omitempty"`
|
LogToStderr bool `json:"logToStderr,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define a type for API readiness check functions
|
// readyCheckFunc defines a type for API readiness check functions
|
||||||
type APIReadyCheckFunc func(string) error
|
type readyCheckFunc func(string) error
|
||||||
|
|
||||||
// CmdAdd implements the CNI spec ADD command handler
|
// CmdAdd implements the CNI spec ADD command handler
|
||||||
func CmdAdd(args *skel.CmdArgs) error {
|
func CmdAdd(args *skel.CmdArgs) error {
|
||||||
@ -74,7 +74,7 @@ func CmdDel(args *skel.CmdArgs) error {
|
|||||||
return nil
|
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)
|
multusShimConfig, err := shimConfig(args.StdinData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", fmt.Errorf("invalid CNI configuration passed to multus-shim: %w", err)
|
return nil, "", fmt.Errorf("invalid CNI configuration passed to multus-shim: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user