Skip to content
This repository was archived by the owner on Feb 3, 2019. It is now read-only.

Commit acdf0f0

Browse files
author
deissh
committed
начал делать главную логику
1 parent dd26068 commit acdf0f0

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

pkg/scaling/scaling.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package scaling
2+
3+
type ScalingConfig struct {
4+
ServiceQuery ServiceQuery
5+
// кол-во попыток запустить еще функции
6+
SetScaleRetries uint
7+
}
8+
9+
func Create (service ServiceQuery) ScalingConfig {
10+
11+
return ScalingConfig{
12+
ServiceQuery: service,
13+
SetScaleRetries: 3,
14+
}
15+
}

pkg/scaling/service.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package scaling
2+
3+
type ServiceQuery struct {
4+
// название образа
5+
Name string
6+
// текущее кол-во реплик
7+
Replicas int
8+
// максимальное кол-во реплик
9+
MaxReplicas int
10+
// минимальное кол-во реплик
11+
MinReplicas int
12+
}

0 commit comments

Comments
 (0)