Documentation ¶
Index ¶
- Variables
- func InitAppService(dbmanager db.Manager, serviceID string) (*v1.AppService, error)
- func InitCacheAppService(dbmanager db.Manager, serviceID, version, createrID string) (*v1.AppService, error)
- func RegistConversion(fun Conversion)
- func RewriteContainerPathInWindows(mountPath string) string
- func RewriteHostPathInWindows(hostPath string) string
- func ServiceSource(as *v1.AppService, dbmanager db.Manager) error
- func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error
- func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error
- func TenantServiceRegist(as *v1.AppService, dbmanager db.Manager) error
- func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error
- type AppServiceBuild
- func (a AppServiceBuild) ApplyRules(port *model.TenantServicesPort, service *corev1.Service) ([]*extensions.Ingress, *corev1.Secret, error)
- func (a *AppServiceBuild) Build() ([]*corev1.Service, []*extensions.Ingress, []*corev1.Secret, error)
- func (a *AppServiceBuild) BuildOnPort(p int, isOut bool) (*corev1.Service, error)
- func (a *AppServiceBuild) CreateUpstreamPluginMappingPort(ports []*model.TenantServicesPort, ...) ([]*model.TenantServicesPort, map[int32]int, error)
- func (a *AppServiceBuild) CreateUpstreamPluginMappingService(services []*corev1.Service, pp map[int32]int) ([]*corev1.Service, error)
- type Conversion
Constants ¶
This section is empty.
Variables ¶
var ErrorNotFoundService = errors.New("service not found")
ErrorNotFoundService error not found
Functions ¶
func InitAppService ¶
InitAppService init a app service
func InitCacheAppService ¶
func InitCacheAppService(dbmanager db.Manager, serviceID, version, createrID string) (*v1.AppService, error)
InitCacheAppService init cache app service. if store manager receive a kube model belong with service and not find in store,will create
func RegistConversion ¶
func RegistConversion(fun Conversion)
RegistConversion regist conversion function list
func RewriteContainerPathInWindows ¶
RewriteContainerPathInWindows mount path in windows
func RewriteHostPathInWindows ¶
RewriteHostPathInWindows rewrite host path
func ServiceSource ¶
func ServiceSource(as *v1.AppService, dbmanager db.Manager) error
ServiceSource conv ServiceSource
func TenantServiceBase ¶
func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error
TenantServiceBase conv tenant service base info
func TenantServicePlugin ¶
func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error
TenantServicePlugin conv service all plugin
func TenantServiceRegist ¶
func TenantServiceRegist(as *v1.AppService, dbmanager db.Manager) error
TenantServiceRegist conv inner and outer service regist
func TenantServiceVersion ¶
func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error
TenantServiceVersion service deploy version conv. define pod spec
Types ¶
type AppServiceBuild ¶
type AppServiceBuild struct {
// contains filtered or unexported fields
}
AppServiceBuild has the ability to build k8s service, ingress and secret
func AppServiceBuilder ¶
func AppServiceBuilder(serviceID, replicationType string, dbmanager db.Manager, as *v1.AppService) (*AppServiceBuild, error)
AppServiceBuilder returns a AppServiceBuild
func (AppServiceBuild) ApplyRules ¶
func (a AppServiceBuild) ApplyRules(port *model.TenantServicesPort, service *corev1.Service) ([]*extensions.Ingress, *corev1.Secret, error)
ApplyRules applies http rules and tcp rules
func (*AppServiceBuild) Build ¶
func (a *AppServiceBuild) Build() ([]*corev1.Service, []*extensions.Ingress, []*corev1.Secret, error)
Build builds service, ingress and secret for each port
func (*AppServiceBuild) BuildOnPort ¶
BuildOnPort 指定端口创建Service
func (*AppServiceBuild) CreateUpstreamPluginMappingPort ¶
func (a *AppServiceBuild) CreateUpstreamPluginMappingPort( ports []*model.TenantServicesPort, pluginPorts []*model.TenantServicesStreamPluginPort, ) ( []*model.TenantServicesPort, map[int32]int, error)
CreateUpstreamPluginMappingPort 检查是否存在upstream插件,接管入口网络
func (*AppServiceBuild) CreateUpstreamPluginMappingService ¶
func (a *AppServiceBuild) CreateUpstreamPluginMappingService(services []*corev1.Service, pp map[int32]int) ([]*corev1.Service, error)
CreateUpstreamPluginMappingService 增加service plugin mapport 标签
type Conversion ¶
type Conversion func(*v1.AppService, db.Manager) error
Conversion conversion function Any application attribute implementation is similarly injected