Documentation
¶
Overview ¶
The commmon package provides structs and functions for external code to interact with this gateway service.
Index ¶
- Constants
- func GetMessageBusAddress(runtimePath string) (string, error)
- func GetPublicKey(runtimePath string) (*ecdsa.PublicKey, error)
- func PrintEventTypesAsMarkdown(sourceID, version string, eventTypes []EventType)
- type EventType
- type GPUInfo
- type ManagementService
- type NotifyService
- type NvidiaGPUInfo
- type PropertyType
- type ShareService
Constants ¶
View Source
const ( ManagementURLFilename = "management.url" StaticURLFilename = "static.url" APIGatewayRoutes = "/v1/gateway/routes" APIGatewayPort = "/v1/gateway/port" )
View Source
const ( MessageBusAddressFilename = "message-bus.url" APIMessageBus = "/v2/message_bus" )
View Source
const ( CasaOSURLFilename = "casaos.url" APICasaOSNotify = "/v1/notify" )
View Source
const (
)
View Source
const (
UserServiceAddressFilename = "user-service.url"
)
Variables ¶
This section is empty.
Functions ¶
func GetMessageBusAddress ¶
Types ¶
type EventType ¶
type EventType struct {
Name string
SourceID string
PropertyTypeList []PropertyType
}
type GPUInfo ¶
type GPUInfo struct {
MemoryTotal int
MemoryUsed int
MemoryFree int
Name string
TemperatureGPU int
}
func GPUInfoList ¶
type ManagementService ¶
type ManagementService interface {
CreateRoute(route *model.Route) error
ChangePort(request *model.ChangePortRequest) error
GetPort() (error, string)
}
func NewManagementService ¶
func NewManagementService(RuntimePath string) (ManagementService, error)
type NotifyService ¶
type NotifyService interface {
SendNotify(path string, message interface{}) error
SendSystemStatusNotify(message map[string]interface{}) error
}
func NewNotifyService ¶
func NewNotifyService(runtimePath string) NotifyService
type NvidiaGPUInfo ¶
type NvidiaGPUInfo struct {
Index int
UUID string
UtilizationGPU int
MemoryTotal int
MemoryUsed int
MemoryFree int
DriverVersion string
Name string
GPUSerial string
DisplayActive bool
DisplayMode bool
TemperatureGPU int
}
func NvidiaGPUInfoList ¶
func NvidiaGPUInfoList() ([]NvidiaGPUInfo, error)
type PropertyType ¶
type ShareService ¶
type ShareService interface {
}
func NewShareService ¶
func NewShareService(runtimePath string) ShareService
Click to show internal directories.
Click to hide internal directories.