Documentation ¶
Index ¶
Constants ¶
View Source
const ( NodeStateLocalNode nodeState = iota NodeStateStable NodeStateStop NodeStateStoping NodeStateStart NodeStateStarting NodeStateNotResponse )
Node State
Variables ¶
View Source
var ( ErrNoConnection = er.New("urn:giti:achaemenid.giti:error:no-connection").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "No Connection", "No connection exist to complete request due to temporary or long term problem", "", ""). SetDetail(protocol.LanguagePersian, errorPersianDomain, "ارتباط قطع", "ارتباطی جهت انجام رخواست مورد نظر بدلیل وجود مشکل موقت یا دایم وجود ندارد", "", "").Save() ErrSendRequest = er.New("urn:giti:achaemenid.giti:error:send-request").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Send Request", "Send request encounter problem due to temporary or long term problem!", "", "").Save() ErrReceiveResponse = er.New("urn:giti:achaemenid.giti:error:receive-response").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Receive Respone", "Receive response encounter problem due to temporary or long term problem!", "", "").Save() ErrBadRequest = er.New("urn:giti:achaemenid.giti:error:bad-request").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Bad Request", "Some given data in request must be invalid or peer not accept them", "", "").Save() ErrBadResponse = er.New("urn:giti:achaemenid.giti:error:bad-response").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Bad Response", "Response data from peer is not valid", "", "").Save() ErrInternalError = er.New("urn:giti:achaemenid.giti:error:internal-error").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Internal Error", "Peer encounter problem due to temporary or long term problem!", "", "").Save() ErrProtocolHandler = er.New("urn:giti:achaemenid.giti:error:protocol-handler").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Protocol Handler", "Protocol handler not exist to complete the request", "", "").Save() ErrGuestConnectionNotAllow = er.New("urn:giti:achaemenid.giti:error:guest-connection-not-allow").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Guest Connection Not Allow", "Guest users don't allow to make new connection", "", "").Save() ErrGuestConnectionMaxReached = er.New("urn:giti:achaemenid.giti:error:guest-connection-max-reached").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Guest Connection Max Reached", "Server not have enough resource to make new guest connection, try few minutes later or try other server", "", "").Save() ErrNotStandardID = er.New("urn:giti:giti:error:not-standard-id").SetDetail(protocol.LanguageEnglish, errorEnglishDomain, "Not Standard ID", "You set non standard ID for error||service||data-structure||..., It can cause some bad situation in your platform", "", "").Save() )
Errors
View Source
var App appStructure
App is the base object that use by other part of app and platforms! It is implement protocol.Application interface
Functions ¶
This section is empty.
Types ¶
type DeployInfo ¶
type DeployInfo struct { // Distribution DistributeOutOfSociety bool // Allow to run service-only instance of app out of original society belong to. DataCentersClass uint8 // 0:FirstClass 256:Low-Quality default:5 MaxNodeNumber uint32 // default:3 NodeFailureTimeOut time.Duration // Max suggestion is 6 hour, other service only node replace failed node! not use in network failure, it is handy proccess! }
DeployInfo store some application deployment information.
type DomainRequestLog ¶
DomainRequestLog is use to improve intelligence of dev-app starting in needed area like cloud, fog, edge,...!
type Manifest ¶
type Manifest struct { Society string SocietyUUID [32]byte SocietyID protocol.SocietyID DomainName string AppID [32]byte // Hash of domain act as Application ID too Email string Icon string AppDeatil map[protocol.LanguageID]AppDetail RequestedPermission []uint32 // ServiceIDs from PersiaOS services e.g. InternetInBackground, Notification, ... TechnicalInfo TechnicalInfo NetworkInfo NetworkInfo DeployInfo DeployInfo }
Manifest store server manifest data All string slice is multi language and in order by ManifestLanguages order
type NetworkInfo ¶
type NetworkInfo struct { // Application Overal rate limit MaxOpenConnection uint64 // The maximum number of concurrent connections the app may serve. ConnectionIdleTimeout etime.Duration // In seconds // Guest rete limit - Connection.OwnerType==0 GuestMaxConnections uint64 // 0 means App not accept guest connection. GuestMaxUserConnectionsPerAddr uint64 GuestMaxConcurrentStreams uint32 GuestMaxStreamConnectionDaily uint32 // Max open stream per day for a guest connection. overflow will drop on creation! GuestMaxServiceCallDaily uint64 // 0 means no limit and good for PayAsGo strategy! GuestMaxBytesSendDaily uint64 GuestMaxBytesReceiveDaily uint64 GuestMaxPacketsSendDaily uint64 GuestMaxPacketsReceiveDaily uint64 // Registered rate limit - Connection.OwnerType==1 RegisteredMaxConnections uint64 RegisteredMaxUserConnectionsPerAddr uint64 RegisteredMaxConcurrentStreams uint32 RegisteredMaxStreamConnectionDaily uint32 // Max open stream per day for a Registered user connection. overflow will drop on creation! RegisteredMaxServiceCallDaily uint64 // 0 means no limit and good for PayAsGo strategy! RegisteredMaxBytesSendDaily uint64 RegisteredMaxBytesReceiveDaily uint64 RegisteredMaxPacketsSendDaily uint64 RegisteredMaxPacketsReceiveDaily uint64 }
NetworkInfo store some network information.
type Node ¶
type Node struct { InstanceID [32]byte ID uint64 Conn *Connection State nodeState // contains filtered or unexported fields }
Node store details about a node that part of the platfrom.
type TechnicalInfo ¶
type TechnicalInfo struct { // Shutdown settings ShutdownDelay time.Duration // the server will wait for at least this amount of time for active streams to finish! // Minimum hardware specification for each instance of application. CPUCores uint8 // Number CPUSpeed uint64 // Hz RAM uint64 // Byte GPU uint64 // Hz Network uint64 // Byte per second Storage uint64 // Byte, HHD||SSD||... indicate by DataCentersClassForDataStore }
TechnicalInfo store some technical information but may different from really server condition!
Click to show internal directories.
Click to hide internal directories.