828339c24e
Change-Id: I7e9a2194a2e83a04dc3e91b26978e063c3c9b6aa Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
43 lines
1.0 KiB
Go
43 lines
1.0 KiB
Go
/*
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package server
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"opendev.org/airship/armada-go/pkg/config"
|
|
"opendev.org/airship/armada-go/pkg/log"
|
|
)
|
|
|
|
// RunCommand phase run command
|
|
type RunCommand struct {
|
|
Factory config.Factory
|
|
}
|
|
|
|
func Apply(c *gin.Context) {
|
|
}
|
|
|
|
// RunE runs the phase
|
|
func (c *RunCommand) RunE() error {
|
|
_, err := c.Factory()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
log.Printf("armada-go server has been started")
|
|
r := gin.Default()
|
|
r.GET("/apply", Apply)
|
|
return r.Run(":8000")
|
|
}
|