Skip to content

Commit

Permalink
Merge pull request #5185 from twz123/no-cplb-on-darwin
Browse files Browse the repository at this point in the history
Don't try to compile CPLB on darwin
  • Loading branch information
twz123 authored Nov 18, 2024
2 parents f70d807 + 1cfc8ff commit f7f153f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//go:build unix

/*
Copyright 2024 k0s authors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !linux

/*
Copyright 2024 k0s authors
Expand All @@ -19,6 +21,8 @@ package controller
import (
"context"
"errors"
"fmt"
"runtime"

k0sAPI "github.com/k0sproject/k0s/pkg/apis/k0s/v1beta1"
"github.com/k0sproject/k0s/pkg/config"
Expand All @@ -35,14 +39,14 @@ type Keepalived struct {
KubeConfigPath string
}

func (k *Keepalived) Init(_ context.Context) error {
return errors.New("CPLB is not supported on Windows")
func (k *Keepalived) Init(context.Context) error {
return fmt.Errorf("%w: CPLB is not supported on %s", errors.ErrUnsupported, runtime.GOOS)
}

func (k *Keepalived) Start(_ context.Context) error {
return errors.New("CPLB is not supported on Windows")
func (k *Keepalived) Start(context.Context) error {
return fmt.Errorf("%w: CPLB is not supported on %s", errors.ErrUnsupported, runtime.GOOS)
}

func (k *Keepalived) Stop() error {
return errors.New("CPLB is not supported on Windows")
return fmt.Errorf("%w: CPLB is not supported on %s", errors.ErrUnsupported, runtime.GOOS)
}

0 comments on commit f7f153f

Please sign in to comment.