Documentation ¶
Index ¶
- Constants
- Variables
- func AuthorizeAndFundApplication(ctx context.Context, response *pb.ProvisionPodResponse, ...) error
- func FundAddress(ctx context.Context, key string, from, to common.Address, ...) error
- func FundPaymentChannel(ethClient *ethclient.Client, publisherAuth *bind.TransactOpts, ...) error
- func GenerateDeploymentFilename(podFile string, deploymentFormat string) (deploymentFile string, relPodFile string, err error)
- func GetPricingTableSubscribers(ethClient *ethclient.Client, registryContract common.Address, tableId *big.Int) ([]common.Address, error)
- func GetProviderHostInfo(ipfs iface.CoreAPI, ethClient *ethclient.Client, ...) (*pb.HostInfo, error)
- func LinkUploadsFromDeployment(pod *pb.Pod, deployment *pb.Deployment) *pb.Pod
- func ReadPodAndDeployment(args []string, manifestFormat string, deploymentFormat string) (podFile string, deploymentFile string, pod *pb.Pod, deployment *pb.Deployment, ...)
- func SaveDeployment(deploymentFile string, deploymentFormat string, deployment *pb.Deployment) error
- func SendToProvider(ctx context.Context, ipfsP2p *ipfs.P2pApi, pod *pb.Pod, ...) (interface{}, error)
- func UploadImages(ctx context.Context, client *containerd.Client, IPFSAddress string, ...) error
- func UploadSecrets(ctx context.Context, ipfs iface.CoreAPI, basepath string, pod *pb.Pod, ...) error
- type P2pProvisionPodServiceClient
- type PricingTableList
- type ProviderHostInfoList
Constants ¶
View Source
const PrivateKeySize = 256 / 8
Variables ¶
View Source
var DefaultDeploymentPath = "~/.apocryph/deployment"
View Source
var DefaultPodFile = "manifest.yaml"
Functions ¶
func AuthorizeAndFundApplication ¶
func AuthorizeAndFundApplication(ctx context.Context, response *pb.ProvisionPodResponse, deployment *pb.Deployment, ethClient *ethclient.Client, publisherAuth *bind.TransactOpts, publisherKey string, amount int64) error
func FundAddress ¶
func FundPaymentChannel ¶
func GetProviderHostInfo ¶
func ReadPodAndDeployment ¶
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) (interface{}, error)
func UploadImages ¶
func UploadImages(ctx context.Context, client *containerd.Client, IPFSAddress 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 ¶
type ProviderHostInfoList ¶
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)
Click to show internal directories.
Click to hide internal directories.