rainbond: github.com/goodrain/rainbond/worker/appm/conversion Index | Files

package conversion

import "github.com/goodrain/rainbond/worker/appm/conversion"


Package Files

autoscaler.go common.go configgroup.go conversion.go errors.go gateway.go monitor.go plugin.go resource.go service.go version.go


var ErrServiceNotFound = errors.New("service not found")

ErrServiceNotFound error not found

func ApplyPluginConfig Uses

func ApplyPluginConfig(as *typesv1.AppService, servicePluginRelation *model.TenantServicePluginRelation,
    dbmanager db.Manager, inboundPluginConfig *api_model.ResourceSpec)

ApplyPluginConfig applyPluginConfig

func InitAppService Uses

func InitAppService(dbmanager db.Manager, serviceID string, configs map[string]string, enableConversionList ...string) (*v1.AppService, error)

InitAppService init a app service

func InitCacheAppService Uses

func InitCacheAppService(dbm db.Manager, serviceID, creatorID 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 Uses

func RegistConversion(name string, fun Conversion)

RegistConversion regist conversion function list

func ServiceSource Uses

func ServiceSource(as *v1.AppService, dbmanager db.Manager) error

ServiceSource conv ServiceSource

func TenantServiceAutoscaler Uses

func TenantServiceAutoscaler(as *v1.AppService, dbmanager db.Manager) error

TenantServiceAutoscaler -

func TenantServiceBase Uses

func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error

TenantServiceBase conv tenant service base info

func TenantServiceConfigGroup Uses

func TenantServiceConfigGroup(as *v1.AppService, dbm db.Manager) error

TenantServiceConfigGroup -

func TenantServiceMonitor Uses

func TenantServiceMonitor(as *v1.AppService, dbmanager db.Manager) error

TenantServiceMonitor tenant service monitor

func TenantServicePlugin Uses

func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error

TenantServicePlugin conv service all plugin

func TenantServiceRegist Uses

func TenantServiceRegist(as *v1.AppService, dbmanager db.Manager) error

TenantServiceRegist conv inner and outer service regist

func TenantServiceVersion Uses

func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error

TenantServiceVersion service deploy version conv. define pod spec

type AppServiceBuild Uses

type AppServiceBuild struct {
    // contains filtered or unexported fields

AppServiceBuild has the ability to build k8s service, ingress and secret

func AppServiceBuilder Uses

func AppServiceBuilder(serviceID, replicationType string, dbmanager db.Manager, as *v1.AppService) (*AppServiceBuild, error)

AppServiceBuilder returns a AppServiceBuild

func (AppServiceBuild) ApplyRules Uses

func (a AppServiceBuild) ApplyRules(serviceID string, containerPort, pluginContainerPort int,
    service *corev1.Service) ([]*extensions.Ingress, []*corev1.Secret, error)

ApplyRules applies http rules and tcp rules

func (*AppServiceBuild) Build Uses

func (a *AppServiceBuild) Build() (*v1.K8sResources, error)

Build builds service, ingress and secret for each port

func (*AppServiceBuild) BuildOnPort Uses

func (a *AppServiceBuild) BuildOnPort(p int, isOut bool) (*corev1.Service, error)

BuildOnPort 指定端口创建Service

func (*AppServiceBuild) CreateUpstreamPluginMappingPort Uses

func (a *AppServiceBuild) CreateUpstreamPluginMappingPort(
    ports []*model.TenantServicesPort,
    pluginPorts []*model.TenantServicesStreamPluginPort,
) (

CreateUpstreamPluginMappingPort 检查是否存在upstream插件,接管入口网络

func (*AppServiceBuild) CreateUpstreamPluginMappingService Uses

func (a *AppServiceBuild) CreateUpstreamPluginMappingService(services []*corev1.Service,
    pp map[int32]int) ([]*corev1.Service, error)

CreateUpstreamPluginMappingService 增加service plugin mapport 标签

type CacheConversion Uses

type CacheConversion struct {
    Name       string
    Conversion Conversion

CacheConversion conversion cache struct

type Conversion Uses

type Conversion func(*v1.AppService, db.Manager) error

Conversion conversion function Any application attribute implementation is similarly injected

Package conversion imports 31 packages (graph) and is imported by 3 packages. Updated 2021-01-16. Refresh now. Tools for package owners.