types

package
Version: v0.0.0-...-5ae6e0f Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package types implement all structs used in the project.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Headers    http.Header `json:"headers"`
	Body       []byte      `json:"body"`
	StatusCode int         `json:"status_code"`
}

type Load

type Load struct {
	// general info
	SchedulerName string `json:"scheduler_name"`
	// functions-related
	FunctionsDeployed      uint `json:"functions_deployed"`
	FunctionsTotalReplicas uint `json:"functions_total_replicas"`
	FunctionsRunning       uint `json:"functions_running"`
	FunctionsRunningMax    uint `json:"functions_running_max"`
	// queue-related
	QueueLengthMax uint `json:"queue_max_length"`
	QueueFill      int  `json:"queue_fill"`
}

type PeerJobRequest

type PeerJobRequest struct {
	// Function    faas.Function     `json:"function"`     // the function that we want to execute
	FunctionName string            `json:"function_name"` // the function name to execute
	Hops         int               `json:"hops"`          // number of times the job is forwarded
	PeersList    []PeersListMember `json:"peers_list"`    // list of peers that handled the job
	Payload      string            `json:"payload"`       // the payload of the request in base64 string
	ContentType  string            `json:"content_type"`  // the mime type of the payload
}

type PeerJobResponse

type PeerJobResponse struct {
	PeersList  []PeersListMember `json:"peers_list"`  // list of peers that handled the job
	Body       string            `json:"body"`        // base64 encoded
	StatusCode int               `json:"status_code"` // job response status code
}

type PeersListMember

type PeersListMember struct {
	MachineId string  `json:"machine_id"`
	MachineIp string  `json:"machine_ip"`
	Timings   Timings `json:"timings"` // timing referred to the passage in that machine
}

type SchedulerDescriptor

type SchedulerDescriptor struct {
	Name       string   `json:"name"`
	Parameters []string `json:"parameters"`
}

type ServiceRequest

type ServiceRequest struct {
	Id                 uint64 // unique id assigned to the request
	ServiceName        string // Name of the function to be executed
	Payload            []byte
	ContentType        string
	External           bool // If the service request comes from another node and not user
	ExternalJobRequest *PeerJobRequest
}

type Timings

type Timings struct {
	ExecutionTime  *float64 `json:"execution_time,omitempty"`  // the time of executing the job comprising the GET to openfaas
	TotalTime      *float64 `json:"total_time,omitempty"`      // elapsed time from job arrival til its completed execution
	SchedulingTime *float64 `json:"scheduling_time,omitempty"` // elapsed time for a job to be scheduled
	ProbingTime    *float64 `json:"probing_time,omitempty"`    // elapsed time for a job to probe other nodes
}

type TimingsStart

type TimingsStart struct {
	ArrivedAt        *time.Time `json:"arrived_at,omitempty"`         // time at which job arrives
	StartedProbingAt *time.Time `json:"started_probing_at,omitempty"` // time at which probing is started
	EndedProbingAt   *time.Time `json:"ended_probing_at,omitempty"`   // time at which probing is ended
	ScheduledAt      *time.Time `json:"scheduled_at,omitempty"`       // time at which job is scheduled internally or externally
}

Jump to

Keyboard shortcuts

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