mirror of https://github.com/k3s-io/k3s
commit
28b9ebed47
|
@ -0,0 +1,5 @@
|
|||
FROM scratch
|
||||
MAINTAINER Ewa Socala <socaa@google.com>
|
||||
ADD resource-consumer /resource-consumer
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/resource-consumer"]
|
|
@ -1,7 +1,7 @@
|
|||
all: resource_consumer
|
||||
|
||||
resource_consumer:
|
||||
go build
|
||||
CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' .
|
||||
|
||||
clean:
|
||||
rm -f resource-consumer
|
||||
|
|
|
@ -17,20 +17,20 @@ limitations under the License.
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/golang/glog"
|
||||
"log"
|
||||
)
|
||||
|
||||
func ConsumeCPU(milicores int, durationSec int) {
|
||||
glog.Infof("ConsumeCPU milicores: %v, durationSec: %v", milicores, durationSec)
|
||||
log.Printf("ConsumeCPU milicores: %v, durationSec: %v", milicores, durationSec)
|
||||
// not implemented
|
||||
}
|
||||
|
||||
func ConsumeMem(megabytes int, durationSec int) {
|
||||
glog.Infof("ConsumeMem megabytes: %v, durationSec: %v", megabytes, durationSec)
|
||||
log.Printf("ConsumeMem megabytes: %v, durationSec: %v", megabytes, durationSec)
|
||||
// not implemented
|
||||
}
|
||||
|
||||
func GetCurrentStatus() {
|
||||
glog.Infof("GetCurrentStatus")
|
||||
log.Printf("GetCurrentStatus")
|
||||
// not implemented
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue