publisher

package
v0.0.0-...-787377c Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDeploymentPath = "~/.apocryph/deployment"
View Source
var DefaultPodFile = "manifest.yaml"

Functions

func FundPaymentChannel

func FundPaymentChannel(ethClient *ethclient.Client, publisherAuth *bind.TransactOpts, deployment *pb.Deployment, funds *big.Int, unlockTimeInt *big.Int, mintFunds bool) error

func GenerateDeploymentFilename

func GenerateDeploymentFilename(podFile string, deploymentFormat string) (deploymentFile string, relPodFile string, err error)

func GetPricingTableSubscribers

func GetPricingTableSubscribers(ethClient *ethclient.Client, registryContract common.Address, tableId *big.Int) ([]common.Address, error)

func GetProviderHostInfo

func GetProviderHostInfo(ipfs iface.CoreAPI, ethClient *ethclient.Client, registryContract common.Address, providerId common.Address) (*pb.HostInfo, error)

func LinkUploadsFromDeployment

func LinkUploadsFromDeployment(pod *pb.Pod, deployment *pb.Deployment) *pb.Pod

func ReadPodAndDeployment

func ReadPodAndDeployment(args []string, manifestFormat string, deploymentFormat string) (podFile string, deploymentFile string, pod *pb.Pod, deployment *pb.Deployment, err error)

func SaveDeployment

func SaveDeployment(deploymentFile string, deploymentFormat string, deployment *pb.Deployment) error

func SendToProvider

func SendToProvider(ctx context.Context, ipfsP2p *ipfs.P2pApi, pod *pb.Pod, deployment *pb.Deployment, client *P2pProvisionPodServiceClient) error

func UploadImages

func UploadImages(ctx context.Context, client *containerd.Client, IPFSAddress string, pod *pb.Pod, deployment *pb.Deployment) error

func UploadSecrets

func UploadSecrets(ctx context.Context, ipfs iface.CoreAPI, basepath string, pod *pb.Pod, deployment *pb.Deployment) error

Types

type P2pProvisionPodServiceClient

type P2pProvisionPodServiceClient struct {
	*tpipfs.IpfsAddr
	pbcon.ProvisionPodServiceClient
}

func ConnectToProvider

func ConnectToProvider(ipfsP2p *ipfs.P2pApi, deployment *pb.Deployment, interceptor *pbcon.AuthInterceptorClient) (*P2pProvisionPodServiceClient, error)

func SetFirstConnectingProvider

func SetFirstConnectingProvider(ipfsp2p *tpipfs.P2pApi, availableProviders ProviderHostInfoList, deployment *pb.Deployment, interceptor *protoconnect.AuthInterceptorClient) (*P2pProvisionPodServiceClient, error)

type PricingTableList

type PricingTableList []*abi.RegistryNewPricingTable

func FilterPricingTables

func FilterPricingTables(tables PricingTableList, filter *abi.RegistryNewPricingTable) PricingTableList

func GetPricingTables

func GetPricingTables(ethClient *ethclient.Client, registryContract common.Address, tokenAddress common.Address) (PricingTableList, error)

type ProviderHostInfoList

type ProviderHostInfoList map[common.Address]*pb.HostInfo

func FilterProviderHostInfos

func FilterProviderHostInfos(region string, peerId string, providers ProviderHostInfoList) (ProviderHostInfoList, error)

func GetProviderHostInfos

func GetProviderHostInfos(ipfs iface.CoreAPI, ethClient *ethclient.Client, registryContract common.Address, tables PricingTableList) (ProviderHostInfoList, error)

Jump to

Keyboard shortcuts

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