Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultInfraMeteringHeartbeatInterval = time.Duration(30) * time.Second
View Source
const EnvNspectId = "NVCF_NSPECT_ID"
Variables ¶
This section is empty.
Functions ¶
func NspectIdFromEnv ¶
func NspectIdFromEnv() string
Types ¶
type Config ¶
type Config struct {
Backend string
NcaId string
BillingNcaId string
InstanceId string
InstanceType string
ICMSEnvironment string
ZoneName string
NspectId string
StartupTime time.Time
InfraHeartbeatInterval time.Duration
GpuCount int
GpuType string
FunctionId string
FunctionVersionId string
FunctionTags []string
TaskId string
TaskTags []string
}
type EventDetails ¶
type EventDetails struct {
RequestId string
Subject string
NcaId string
InferenceDurationSeconds int
InferenceSize int64
ResponseType string
BillingHeaders map[string]string
// contains filtered or unexported fields
}
func New ¶
func New(config *Config, requestId string, subject string, ncaId string, headers []*pb.StringKV) *EventDetails
func (*EventDetails) Log ¶
func (e *EventDetails) Log() error
type InfraMetering ¶
type InfraMetering struct {
// contains filtered or unexported fields
}
func NewInfraMetering ¶
func NewInfraMetering(ctx context.Context, workload Workload, config *Config, status InfraStatus) *InfraMetering
func (*InfraMetering) Close ¶
func (im *InfraMetering) Close() error
func (*InfraMetering) SetStatus ¶
func (im *InfraMetering) SetStatus(status InfraStatus)
type InfraStatus ¶
type InfraStatus string
const ( InfraInitializing InfraStatus = "initializing" InfraReady InfraStatus = "ready" )
Click to show internal directories.
Click to hide internal directories.