profile

package
v0.0.0-...-fec9766 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppCommand_Command_name = map[int32]string{
		0: "COMMAND_UNSPECIFIED",
		1: "COMMAND_RESTART",
		2: "COMMAND_PURGE",
	}
	AppCommand_Command_value = map[string]int32{
		"COMMAND_UNSPECIFIED": 0,
		"COMMAND_RESTART":     1,
		"COMMAND_PURGE":       2,
	}
)

Enum value maps for AppCommand_Command.

View Source
var (
	LocalDevCmd_Command_name = map[int32]string{
		0: "COMMAND_UNSPECIFIED",
		1: "COMMAND_SHUTDOWN",
		2: "COMMAND_SHUTDOWN_POWEROFF",
	}
	LocalDevCmd_Command_value = map[string]int32{
		"COMMAND_UNSPECIFIED":       0,
		"COMMAND_SHUTDOWN":          1,
		"COMMAND_SHUTDOWN_POWEROFF": 2,
	}
)

Enum value maps for LocalDevCmd_Command.

View Source
var File_profile_local_profile_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AppCommand

type AppCommand struct {

	// Reference the application instance by its ID (which is an instance of UUID).
	// At least one of the id and displayname should be defined.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Reference the application instance by the user-friendly displayname.
	// At least one of the id and displayname should be defined.
	Displayname string `protobuf:"bytes,2,opt,name=displayname,proto3" json:"displayname,omitempty"`
	// Timestamp to record when the request to run the command was made.
	// The format of the timestamp is not defined. It can be a Unix timestamp
	// or a different time representation. It is not even required for the timestamp
	// to match the real time or to be in-sync with the device clock.
	// What is required, however, is that two successive but distinct requests made
	// for the same application will have different timestamps attached.
	// This requirement applies even between restarts of the Local profile server.
	// A request made after a restart should not have the same timestamp attached
	// as the previous request made for the same application before the restart.
	//
	// EVE guarantees that a newly added command request or a change of the timestamp
	// will result in the command being triggered ASAP. Even if the execution of a command
	// is interrupted by a device reboot/crash, the eventuality of the command completion
	// is still guaranteed. The only exception is if Local Profile Server restarts/crashes
	// shortly after a request is made, in which case it can get lost before EVE is able
	// to receive it. For this scenario to be avoided, a persistence of command requests
	// on the side of the Local Profile server is necessary.
	Timestamp uint64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Command to run.
	Command AppCommand_Command `protobuf:"varint,4,opt,name=command,proto3,enum=org.lfedge.eve.profile.AppCommand_Command" json:"command,omitempty"`
	// contains filtered or unexported fields
}

AppCommand references a running application instance by UUID and/or displayname, and describes a command to execute for this instance.

func (*AppCommand) Descriptor deprecated

func (*AppCommand) Descriptor() ([]byte, []int)

Deprecated: Use AppCommand.ProtoReflect.Descriptor instead.

func (*AppCommand) GetCommand

func (x *AppCommand) GetCommand() AppCommand_Command

func (*AppCommand) GetDisplayname

func (x *AppCommand) GetDisplayname() string

func (*AppCommand) GetId

func (x *AppCommand) GetId() string

func (*AppCommand) GetTimestamp

func (x *AppCommand) GetTimestamp() uint64

func (*AppCommand) ProtoMessage

func (*AppCommand) ProtoMessage()

func (*AppCommand) ProtoReflect

func (x *AppCommand) ProtoReflect() protoreflect.Message

func (*AppCommand) Reset

func (x *AppCommand) Reset()

func (*AppCommand) String

func (x *AppCommand) String() string

type AppCommand_Command

type AppCommand_Command int32
const (
	AppCommand_COMMAND_UNSPECIFIED AppCommand_Command = 0
	// Application instance, which is either running or transitioning to a running state,
	// will be stopped and subsequently started again, preserving the mutated run time state.
	AppCommand_COMMAND_RESTART AppCommand_Command = 1
	// Application instance, which is either running or transitioning to a running state,
	// will be stopped and the mutated run time state of the app is deleted.
	// A subsequent action to start the app will start it with a pristine runtime state.
	// This command will purge ALL volumes used by the application.
	AppCommand_COMMAND_PURGE AppCommand_Command = 2
)

func (AppCommand_Command) Descriptor

func (AppCommand_Command) Enum

func (AppCommand_Command) EnumDescriptor deprecated

func (AppCommand_Command) EnumDescriptor() ([]byte, []int)

Deprecated: Use AppCommand_Command.Descriptor instead.

func (AppCommand_Command) Number

func (AppCommand_Command) String

func (x AppCommand_Command) String() string

func (AppCommand_Command) Type

type CellularStatus

type CellularStatus struct {

	// Logical label assigned to the physical cellular modem.
	Logicallabel string                    `protobuf:"bytes,1,opt,name=logicallabel,proto3" json:"logicallabel,omitempty"`
	Module       *info.ZCellularModuleInfo `protobuf:"bytes,2,opt,name=module,proto3" json:"module,omitempty"`
	SimCards     []*info.ZSimcardInfo      `protobuf:"bytes,3,rep,name=sim_cards,json=simCards,proto3" json:"sim_cards,omitempty"`
	Providers    []*info.ZCellularProvider `protobuf:"bytes,4,rep,name=providers,proto3" json:"providers,omitempty"`
	ConfigError  string                    `protobuf:"bytes,10,opt,name=config_error,json=configError,proto3" json:"config_error,omitempty"`
	ProbeError   string                    `protobuf:"bytes,11,opt,name=probe_error,json=probeError,proto3" json:"probe_error,omitempty"`
	// contains filtered or unexported fields
}

CellularStatus contains status information for a single LTE network.

func (*CellularStatus) Descriptor deprecated

func (*CellularStatus) Descriptor() ([]byte, []int)

Deprecated: Use CellularStatus.ProtoReflect.Descriptor instead.

func (*CellularStatus) GetConfigError

func (x *CellularStatus) GetConfigError() string

func (*CellularStatus) GetLogicallabel

func (x *CellularStatus) GetLogicallabel() string

func (*CellularStatus) GetModule

func (x *CellularStatus) GetModule() *info.ZCellularModuleInfo

func (*CellularStatus) GetProbeError

func (x *CellularStatus) GetProbeError() string

func (*CellularStatus) GetProviders

func (x *CellularStatus) GetProviders() []*info.ZCellularProvider

func (*CellularStatus) GetSimCards

func (x *CellularStatus) GetSimCards() []*info.ZSimcardInfo

func (*CellularStatus) ProtoMessage

func (*CellularStatus) ProtoMessage()

func (*CellularStatus) ProtoReflect

func (x *CellularStatus) ProtoReflect() protoreflect.Message

func (*CellularStatus) Reset

func (x *CellularStatus) Reset()

func (*CellularStatus) String

func (x *CellularStatus) String() string

type LocalAppCmdList

type LocalAppCmdList struct {

	// Security token. EVE will verify that server_token matches the profile server
	// token received from the controller.
	ServerToken string `protobuf:"bytes,1,opt,name=server_token,json=serverToken,proto3" json:"server_token,omitempty"`
	// A list of commands requested to be executed for locally running application instances.
	// A new request created for the same application should overwrite the previous entry
	// with the 'timestamp' field updated. In other words, the list should contain at most
	// one entry for each application instance.
	// It is not required for the Local profile server to persist command requests.
	// Also, it is not required for the Local profile server to stop submitting command
	// requests that have been already processed by EVE. Using the `timestamp` field,
	// EVE is able to determine if a given command request has been already handled or not.
	// To check if the last requested command has completed, compare its timestamp with
	// 'last_cmd_timestamp' from `LocalAppInfo` message, submitted by EVE in the request
	// body of the api/v1/appinfo API.
	AppCommands []*AppCommand `protobuf:"bytes,2,rep,name=app_commands,json=appCommands,proto3" json:"app_commands,omitempty"`
	// contains filtered or unexported fields
}

LocalAppCmdList message may be returned in the response from a POST request sent to the api/v1/appinfo API.

func (*LocalAppCmdList) Descriptor deprecated

func (*LocalAppCmdList) Descriptor() ([]byte, []int)

Deprecated: Use LocalAppCmdList.ProtoReflect.Descriptor instead.

func (*LocalAppCmdList) GetAppCommands

func (x *LocalAppCmdList) GetAppCommands() []*AppCommand

func (*LocalAppCmdList) GetServerToken

func (x *LocalAppCmdList) GetServerToken() string

func (*LocalAppCmdList) ProtoMessage

func (*LocalAppCmdList) ProtoMessage()

func (*LocalAppCmdList) ProtoReflect

func (x *LocalAppCmdList) ProtoReflect() protoreflect.Message

func (*LocalAppCmdList) Reset

func (x *LocalAppCmdList) Reset()

func (*LocalAppCmdList) String

func (x *LocalAppCmdList) String() string

type LocalAppInfo

type LocalAppInfo struct {
	Id      string          `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Version string          `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Name    string          `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Err     *info.ErrorInfo `protobuf:"bytes,4,opt,name=err,proto3" json:"err,omitempty"`
	State   info.ZSwState   `protobuf:"varint,5,opt,name=state,proto3,enum=org.lfedge.eve.info.ZSwState" json:"state,omitempty"`
	// Value of the field `timestamp` from the last `AppCommand` that was
	// requested by the Local profile server, received by EVE and has completed
	// its execution for this application instance.
	LastCmdTimestamp uint64 `protobuf:"varint,6,opt,name=last_cmd_timestamp,json=lastCmdTimestamp,proto3" json:"last_cmd_timestamp,omitempty"`
	// contains filtered or unexported fields
}

LocalAppInfo contains information about app on EdgeNode

func (*LocalAppInfo) Descriptor deprecated

func (*LocalAppInfo) Descriptor() ([]byte, []int)

Deprecated: Use LocalAppInfo.ProtoReflect.Descriptor instead.

func (*LocalAppInfo) GetErr

func (x *LocalAppInfo) GetErr() *info.ErrorInfo

func (*LocalAppInfo) GetId

func (x *LocalAppInfo) GetId() string

func (*LocalAppInfo) GetLastCmdTimestamp

func (x *LocalAppInfo) GetLastCmdTimestamp() uint64

func (*LocalAppInfo) GetName

func (x *LocalAppInfo) GetName() string

func (*LocalAppInfo) GetState

func (x *LocalAppInfo) GetState() info.ZSwState

func (*LocalAppInfo) GetVersion

func (x *LocalAppInfo) GetVersion() string

func (*LocalAppInfo) ProtoMessage

func (*LocalAppInfo) ProtoMessage()

func (*LocalAppInfo) ProtoReflect

func (x *LocalAppInfo) ProtoReflect() protoreflect.Message

func (*LocalAppInfo) Reset

func (x *LocalAppInfo) Reset()

func (*LocalAppInfo) String

func (x *LocalAppInfo) String() string

type LocalAppInfoList

type LocalAppInfoList struct {
	AppsInfo []*LocalAppInfo `protobuf:"bytes,1,rep,name=apps_info,json=appsInfo,proto3" json:"apps_info,omitempty"`
	// contains filtered or unexported fields
}

LocalAppInfoList contains information about all app on EdgeNode sent to the api/v1/appinfo

func (*LocalAppInfoList) Descriptor deprecated

func (*LocalAppInfoList) Descriptor() ([]byte, []int)

Deprecated: Use LocalAppInfoList.ProtoReflect.Descriptor instead.

func (*LocalAppInfoList) GetAppsInfo

func (x *LocalAppInfoList) GetAppsInfo() []*LocalAppInfo

func (*LocalAppInfoList) ProtoMessage

func (*LocalAppInfoList) ProtoMessage()

func (*LocalAppInfoList) ProtoReflect

func (x *LocalAppInfoList) ProtoReflect() protoreflect.Message

func (*LocalAppInfoList) Reset

func (x *LocalAppInfoList) Reset()

func (*LocalAppInfoList) String

func (x *LocalAppInfoList) String() string

type LocalDevCmd

type LocalDevCmd struct {

	// Security token. EVE will verify that server_token matches the profile server
	// token received from the controller.
	ServerToken string `protobuf:"bytes,1,opt,name=server_token,json=serverToken,proto3" json:"server_token,omitempty"`
	Timestamp   uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Command to run.
	Command LocalDevCmd_Command `protobuf:"varint,3,opt,name=command,proto3,enum=org.lfedge.eve.profile.LocalDevCmd_Command" json:"command,omitempty"`
	// contains filtered or unexported fields
}

LocalDevCmd message may be returned in the response from a POST request sent to the api/v1/devinfo API.

func (*LocalDevCmd) Descriptor deprecated

func (*LocalDevCmd) Descriptor() ([]byte, []int)

Deprecated: Use LocalDevCmd.ProtoReflect.Descriptor instead.

func (*LocalDevCmd) GetCommand

func (x *LocalDevCmd) GetCommand() LocalDevCmd_Command

func (*LocalDevCmd) GetServerToken

func (x *LocalDevCmd) GetServerToken() string

func (*LocalDevCmd) GetTimestamp

func (x *LocalDevCmd) GetTimestamp() uint64

func (*LocalDevCmd) ProtoMessage

func (*LocalDevCmd) ProtoMessage()

func (*LocalDevCmd) ProtoReflect

func (x *LocalDevCmd) ProtoReflect() protoreflect.Message

func (*LocalDevCmd) Reset

func (x *LocalDevCmd) Reset()

func (*LocalDevCmd) String

func (x *LocalDevCmd) String() string

type LocalDevCmd_Command

type LocalDevCmd_Command int32
const (
	LocalDevCmd_COMMAND_UNSPECIFIED LocalDevCmd_Command = 0
	// SHUTDOWN: Edge node will initiate a graceful shutdown of all of the app
	// instances on the node (including an application instance implementing
	// the local profile server API).
	// The state of the application instances (HALTING, HALTED, etc) can be
	// observed since is sent to the api/v1/appinfo API endpoint as normal.
	// Any local profile server is shut down after all the other app instances
	// have halted.
	LocalDevCmd_COMMAND_SHUTDOWN LocalDevCmd_Command = 1
	// SHUTDOWN_POWEROFF: As above, but once all of the app instances have
	// been shut down the edge node will also power off. Note that the power
	// on will need to be done through other local means (UPS power cycling
	// the edge node or someone manually power cycling the edge node.)
	LocalDevCmd_COMMAND_SHUTDOWN_POWEROFF LocalDevCmd_Command = 2
)

func (LocalDevCmd_Command) Descriptor

func (LocalDevCmd_Command) Enum

func (LocalDevCmd_Command) EnumDescriptor deprecated

func (LocalDevCmd_Command) EnumDescriptor() ([]byte, []int)

Deprecated: Use LocalDevCmd_Command.Descriptor instead.

func (LocalDevCmd_Command) Number

func (LocalDevCmd_Command) String

func (x LocalDevCmd_Command) String() string

func (LocalDevCmd_Command) Type

type LocalDevInfo

type LocalDevInfo struct {
	DeviceUuid             string                       `protobuf:"bytes,1,opt,name=device_uuid,json=deviceUuid,proto3" json:"device_uuid,omitempty"`
	State                  info.ZDeviceState            `protobuf:"varint,2,opt,name=state,proto3,enum=org.lfedge.eve.info.ZDeviceState" json:"state,omitempty"`
	MaintenanceModeReasons []info.MaintenanceModeReason `` /* 184-byte string literal not displayed */
	BootTime               *timestamppb.Timestamp       `protobuf:"bytes,4,opt,name=boot_time,json=bootTime,proto3" json:"boot_time,omitempty"`
	LastBootReason         info.BootReason              `` /* 142-byte string literal not displayed */
	// Value of the field `timestamp` from the last `DevCommand` that was
	// requested by the Local profile server, received by EVE and has completed
	// its execution for this edge node.
	LastCmdTimestamp uint64 `protobuf:"varint,10,opt,name=last_cmd_timestamp,json=lastCmdTimestamp,proto3" json:"last_cmd_timestamp,omitempty"`
	// contains filtered or unexported fields
}

LocalDevInfo contains information about an EdgeNode sent to the api/v1/devinfo

func (*LocalDevInfo) Descriptor deprecated

func (*LocalDevInfo) Descriptor() ([]byte, []int)

Deprecated: Use LocalDevInfo.ProtoReflect.Descriptor instead.

func (*LocalDevInfo) GetBootTime

func (x *LocalDevInfo) GetBootTime() *timestamppb.Timestamp

func (*LocalDevInfo) GetDeviceUuid

func (x *LocalDevInfo) GetDeviceUuid() string

func (*LocalDevInfo) GetLastBootReason

func (x *LocalDevInfo) GetLastBootReason() info.BootReason

func (*LocalDevInfo) GetLastCmdTimestamp

func (x *LocalDevInfo) GetLastCmdTimestamp() uint64

func (*LocalDevInfo) GetMaintenanceModeReasons

func (x *LocalDevInfo) GetMaintenanceModeReasons() []info.MaintenanceModeReason

func (*LocalDevInfo) GetState

func (x *LocalDevInfo) GetState() info.ZDeviceState

func (*LocalDevInfo) ProtoMessage

func (*LocalDevInfo) ProtoMessage()

func (*LocalDevInfo) ProtoReflect

func (x *LocalDevInfo) ProtoReflect() protoreflect.Message

func (*LocalDevInfo) Reset

func (x *LocalDevInfo) Reset()

func (*LocalDevInfo) String

func (x *LocalDevInfo) String() string

type LocalProfile

type LocalProfile struct {
	LocalProfile string `protobuf:"bytes,1,opt,name=local_profile,json=localProfile,proto3" json:"local_profile,omitempty"`
	ServerToken  string `protobuf:"bytes,2,opt,name=server_token,json=serverToken,proto3" json:"server_token,omitempty"`
	// contains filtered or unexported fields
}

LocalProfile message is sent in response to a GET to the api/v1/local_profile API

func (*LocalProfile) Descriptor deprecated

func (*LocalProfile) Descriptor() ([]byte, []int)

Deprecated: Use LocalProfile.ProtoReflect.Descriptor instead.

func (*LocalProfile) GetLocalProfile

func (x *LocalProfile) GetLocalProfile() string

func (*LocalProfile) GetServerToken

func (x *LocalProfile) GetServerToken() string

func (*LocalProfile) ProtoMessage

func (*LocalProfile) ProtoMessage()

func (*LocalProfile) ProtoReflect

func (x *LocalProfile) ProtoReflect() protoreflect.Message

func (*LocalProfile) Reset

func (x *LocalProfile) Reset()

func (*LocalProfile) String

func (x *LocalProfile) String() string

type RadioConfig

type RadioConfig struct {

	// Security token. EVE will verify that serverToken matches the profile server
	// token received from the controller.
	ServerToken string `protobuf:"bytes,1,opt,name=server_token,json=serverToken,proto3" json:"server_token,omitempty"`
	// If enabled, EVE will disable radio transmission on all wireless devices available
	// to the host (i.e. it does not cover wireless devices directly attached to applications).
	RadioSilence bool `protobuf:"varint,2,opt,name=radio_silence,json=radioSilence,proto3" json:"radio_silence,omitempty"`
	// contains filtered or unexported fields
}

RadioConfig message may be returned in the response from a POST request sent to the api/v1/radio API.

func (*RadioConfig) Descriptor deprecated

func (*RadioConfig) Descriptor() ([]byte, []int)

Deprecated: Use RadioConfig.ProtoReflect.Descriptor instead.

func (*RadioConfig) GetRadioSilence

func (x *RadioConfig) GetRadioSilence() bool

func (*RadioConfig) GetServerToken

func (x *RadioConfig) GetServerToken() string

func (*RadioConfig) ProtoMessage

func (*RadioConfig) ProtoMessage()

func (*RadioConfig) ProtoReflect

func (x *RadioConfig) ProtoReflect() protoreflect.Message

func (*RadioConfig) Reset

func (x *RadioConfig) Reset()

func (*RadioConfig) String

func (x *RadioConfig) String() string

type RadioStatus

type RadioStatus struct {

	// radio_silence is True if the Radio-Silence mode is enabled by config AND successfully
	// applied for all radio devices.
	// If the radio silence was requested but this field is still returned as False,
	// expect non-empty config_error attached.
	RadioSilence bool `protobuf:"varint,1,opt,name=radio_silence,json=radioSilence,proto3" json:"radio_silence,omitempty"`
	// If the last radio configuration change failed, error message is reported here.
	// Please note that there is also a per-modem configuration error reported under CellularStatus.
	ConfigError string `protobuf:"bytes,2,opt,name=config_error,json=configError,proto3" json:"config_error,omitempty"`
	// Status of every LTE network.
	CellularStatus []*CellularStatus `protobuf:"bytes,3,rep,name=cellular_status,json=cellularStatus,proto3" json:"cellular_status,omitempty"`
	// Metrics for every LTE network.
	CellularMetrics []*metrics.CellularMetric `protobuf:"bytes,4,rep,name=cellular_metrics,json=cellularMetrics,proto3" json:"cellular_metrics,omitempty"` // XXX Later we can add status for every WiFi network adapter.
	// contains filtered or unexported fields
}

RadioStatus message is sent in the POST request to the api/v1/radio API.

func (*RadioStatus) Descriptor deprecated

func (*RadioStatus) Descriptor() ([]byte, []int)

Deprecated: Use RadioStatus.ProtoReflect.Descriptor instead.

func (*RadioStatus) GetCellularMetrics

func (x *RadioStatus) GetCellularMetrics() []*metrics.CellularMetric

func (*RadioStatus) GetCellularStatus

func (x *RadioStatus) GetCellularStatus() []*CellularStatus

func (*RadioStatus) GetConfigError

func (x *RadioStatus) GetConfigError() string

func (*RadioStatus) GetRadioSilence

func (x *RadioStatus) GetRadioSilence() bool

func (*RadioStatus) ProtoMessage

func (*RadioStatus) ProtoMessage()

func (*RadioStatus) ProtoReflect

func (x *RadioStatus) ProtoReflect() protoreflect.Message

func (*RadioStatus) Reset

func (x *RadioStatus) Reset()

func (*RadioStatus) String

func (x *RadioStatus) String() string

Jump to

Keyboard shortcuts

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