svc

package
v1.10.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SIA_CONFIG    = "/etc/sia/sia_config"
	SIA_DIR       = "/var/lib/sia"
	HOST_DOCUMENT = "host_document"
)

Variables

View Source
var ApiVersion = "2020-06-01"
View Source
var AzureVmMetaEndPoint = "http://169.254.169.254"
View Source
var Ec2MetaEndPoint = "http://169.254.169.254:80"
View Source
var EksMetaEndPoint = "http://169.254.169.254:80"
View Source
var FargateMetaEndPoint = "http://169.254.170.2"

Functions

func GetAccountId

func GetAccountId() (string, error)

func ReadHostDocument

func ReadHostDocument() ([]byte, string)

func ReadSiaConfig

func ReadSiaConfig() ([]byte, string)

func SetCloudFetcher

func SetCloudFetcher(fetcher Fetcher)

func SetOnPremFetcher

func SetOnPremFetcher(fetcher Fetcher)

Types

type AzureVmFetcher

type AzureVmFetcher struct {
}

func (*AzureVmFetcher) Fetch

func (fetcher *AzureVmFetcher) Fetch(host MsdHost, accountId string) (ServicesData, error)

func (*AzureVmFetcher) GetAccountId

func (fetcher *AzureVmFetcher) GetAccountId() (string, error)

type EC2Fetcher

type EC2Fetcher struct {
}

func (*EC2Fetcher) Fetch

func (fetcher *EC2Fetcher) Fetch(host MsdHost, accountId string) (ServicesData, error)

func (*EC2Fetcher) GetAccountId

func (fetcher *EC2Fetcher) GetAccountId() (string, error)

type EKSFetcher

type EKSFetcher struct {
}

func (*EKSFetcher) Fetch

func (fetcher *EKSFetcher) Fetch(host MsdHost, accountId string) (ServicesData, error)

func (*EKSFetcher) GetAccountId

func (fetcher *EKSFetcher) GetAccountId() (string, error)

type FargateFetcher

type FargateFetcher struct {
}

func (*FargateFetcher) Fetch

func (fetcher *FargateFetcher) Fetch(host MsdHost, accountId string) (ServicesData, error)

func (*FargateFetcher) GetAccountId

func (fetcher *FargateFetcher) GetAccountId() (string, error)

type Fetcher

type Fetcher interface {
	Fetch(host MsdHost, accountId string) (ServicesData, error)
	GetAccountId() (string, error)
}

type MsdHost

type MsdHost struct {
	HostDocument []byte
	SiaConfig    []byte
}

type Service

type Service struct {
	Name     string
	Filename string
	User     string
	Group    string
	Uid      int
	Gid      int
	FileMode int
}

type ServicesData

type ServicesData struct {
	SrvArr []Service
	Ips    []net.IP
	Domain string
}

func GetServicesData

func GetServicesData(accountId string) (ServicesData, error)

Map the service name to its service configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL