Interface GolemConfig

interface GolemConfig {
    api?: {
        key: string;
        url?: string;
    };
    deploy: {
        downscaleIntervalSec: number;
        maxReplicas: number;
        resources: Partial<{
            minCpu: number;
            minMemGib: number;
            minStorageGib: number;
        }>;
    };
    initTimeoutSec: number;
    market: {
        priceGlmPerHour: number;
        rentHours: number;
    };
    requestStartTimeoutSec: number;
}

Properties

api?: {
    key: string;
    url?: string;
}

Golem Node's (yagna) API related config params.

Type declaration

  • key: string

    The API key that your script will use to contact yagna

    You can obtain this from yagna app-key list command.

  • Optional url?: string

    The URL to yagna API

    It can be provided via the GOLEM_API_URL environment variable.

    Defaults to http://localhost:7465/

deploy: {
    downscaleIntervalSec: number;
    maxReplicas: number;
    resources: Partial<{
        minCpu: number;
        minMemGib: number;
        minStorageGib: number;
    }>;
}

Represents the deployment configuration for a service on Golem Network

Type declaration

  • downscaleIntervalSec: number

    The time interval (in seconds) between checks to release unused resources.

  • maxReplicas: number

    How many instances of that service you want to have at maximum, given the idle ones will be freed to control costs

  • resources: Partial<{
        minCpu: number;
        minMemGib: number;
        minStorageGib: number;
    }>

    Specify the computation resource criteria to filter offers on the Golem Network

initTimeoutSec: number

Number of seconds to wait for the Golem component to initialize (be ready to accept requests and order resources on Golem Network)

market: {
    priceGlmPerHour: number;
    rentHours: number;
}

Specification of how long you want to rent the compute resources for

These parameters will be used to find the providers matching your pricing criteria, estimate and allocate GLM budget for the operations.

Type declaration

  • priceGlmPerHour: number

    What's the desired hourly rate spend in GLM/hour

  • rentHours: number

    How long you want to rent the resources in hours

requestStartTimeoutSec: number

Number of seconds to wait for a request to start

This value has to consider time for a fresh replica to be added before the request is sent to one.

Generated using TypeDoc