CloseResponse is not empty because it can return an error. However, there is no
action that the receiver of this response can take other than perhaps issuing a warning
to the system operators.
LoadTestDataRequest loads the contents of given directory from the host file system into the /app directory
of the test filesystem (in memory). This is only intended to be use for test code.
where this new file will exist in the in-memory filesystem… this path will be cleaned lexically and then joined to /app. Note that it is possible create paths with this parameter that cannot be opened because of restrictions on the path in open.
returnOnFail should be set to true if you do NOT want the normal behavior of using panic on error. If this value is set to true, the paths that cause an error on import are return in the TestDataResponse.
LoadTestDataResponse
LoadTestDataResponse contains a list of paths that caused an error during loading. This value is only
returned if the LoadRequest has the returnOnFail set to true. If LoadDataRequest.return_on_fail is
false since by definition the error_path will be empty.
The number of bytes written from buf (0 <= num_write <= len(buf))
FileErr
Name
Number
Description
NoError
0
mandatory
DispatchError
1
mandatory
UnmarshalError
2
mandatory
MarshalError
3
mandatory
InvalidPathError
4
InvalidPathError: Provided path name is not valid based on following rules: 1. The separator should be "/" 2. It should start with specific prefix -> '/parigot/app/' 3. It should not contain any "." or ".." in the path 4. It should not exceed a specific value for the number (max is 20) of parts in the path 5. It should avoid certain special characters, including: Asterisk (*) Question mark (?) Greater than (>) Less than (<) Pipe symbol (
Invalid example:
'/parigot/app/..' -> '..' is not allowed '/parigot/app/./' -> '.' is not allowed '/parigot/app/foo\bar' -> '\' is not allowed '//parigot/app/foo', '/parigot/app' -> prefix should be '/parigot/app/' |
| AlreadyInUseError | 5 | File status related errors
The file is already being used. |
| NotExistError | 6 | The file/path does not exist |
| FileClosedError | 7 | The file status is CLOSED, cannot be accessed by a read or write request |
| EOFError | 8 | The file is at the end of the file |
| ReadError | 9 | Some error happened during reading a file |
| WriteError | 10 | Some error happened during writing a file |
| OpenError | 11 | Some error happened during opening a file |
| DeleteError | 12 | Some error happened during deleting a file |
| CreateError | 13 | Some error happened during creating a file |
| NoDataFoundError | 14 | No data file found in the directory |
| LargeBufError | 15 | The buffer for the file is too large |
| InternalError | 16 | There are internal issues with the file service |
Create handles the WRITE-only operation on a file. It creates or truncates the name file in the path. If the file already exists, it is truncated. If the file does not exist, it is created.
BindMethodRequest is used to tell parigot that the given service_id (located
at host_id) has an implementation for the given method name. This will create
the mapping to a method_id, which is in the response. The direction parameter
is either METHOD_DIRECTION_IN, OUT, or BOTH. IN means thath the method has
no output parameter (the result is ignored), OUT means the method has no input
parameters, and BOTH means that both input and output parameters are used.
DependencyExistsRequest is used to check if there a dependency
path from source to destination. Callers should use either
a target service or a target service name, not both.
The semantics are slightly different. When you ask about the
name of a service, it is a question about what the service
has declared with require calls. When you ask about a specific
service you are asking if a dependency path between the two services
exists and thus the dest service must be started before the
source.
inside is another Request object, but we don't know its type
DispatchResponse
DispatchResponse sent by the server back to a client. This what is returned
as the intermediate value to the caller, because the caller
cannot block. This call_id value can be used on the client side
to map to additional info about the call.
ExitPair is a structure that is a service that is requesting
an exit and the exit code desired. The service can be empty
if the caller wants the entire suite of services to be exited.
Code will be in the "allowed" range of 0 to 192.
ExitRequest is how you can request for your wasm program, or the whole system
to exit. This will not terminate the process immediately as there may be other
services running that need to be notified.
For the code in the ExitPair, the valid values here are 0…192 and values>192 or <0 will be set to 192. The valid values for the service are a service id (typically the service making this request) or an zero valued service, indicating that the entire system should be brought down.
ExportRequest informs the kernel that the given
service id implements the named services on the
host given. Note that the services provided must be
distinct.
FullyQualified service is the complete (protobuf) name of a service as a
a string. This is typically something like "foo.v1" for the package and
the service name is "Foo". These are the names used by the export, require,
and locate calls.
HostBinding is the mapping between a service and a host. Note that a given
host may be bound to many services, but a single service is always bound
to exactly one host.
LaunchRequest is used to block a service until its depnedencies are ready.
It returns a future to the guest that can be used to take action once
launch is completed.
called_by is only needed for true clients. If you are doing a call to locate with a service that you did not and could not have known beforehand you should leave this empty.
LocateResponse
LocateResponse hands back the service Id of the package_name and service_name supplied in the request.
A service id can be thought of as a (network hostname,port) pair that defines which
service's "location".
MessageBundle tells the receiver all the necessary info to make a call
on a method. Note that when this is sent to a particular server, the HostId
is the host id of the caller not the place where the service is implemented.
ReadOneRequest gives a set of service/method pairs
that should be considered for a read. The ReadOne
operation returns a single service/method pair that
has received a call. If the timeout expires, only
the timeout bool is returned. If the timeout value
is 0, then an instanteous sample is returned. If
the timeout value is negative, it means wait forever.
In addition to potential calls on the service who
requests this read, it is also possible that the
return value represents a completed call from a previous
point in the execution of the calling program.
ReadOneResponse is returned when the control
is turned over to parigot for a period of time via
a call to ReadOne.
ReadOneResponse returns timeout = true if a timeout
has occurred. If timeout is true, all the other fields
should be ignored. There are two types of results and
these are mutually exclusive.
If resolved is not nil, then this a notification that a
call made by this program have completed. The
resolved field holds information about the completed call,
and that data needs to be matched with the appropriate call ids
and the promises resolved.
If resolved is nil, then the call is a call
on a service and method exposed by this server. In that case the pair indicates the method and service
being invoked, and the param and call id should be
to create a matching ReturnValueRequest.
Note that if the method denoted by the pair does not
take input, the value of param should be ignored and
it may be nil.
Require establishes that the source given is going to import the service
given by dest. It is not required that the source locate the dest, although
if one does call locate, a check is done to insure require was called previously.
This check is done to prevent a common programming mistake.
ResolvedCall is used to hold the output of a service/method call while we
are waiting for the future to be resolved. Note that the host_id here is the
host id of the SENDER of this message, so the place that the result was
calculated.
ServiceByName looks up the given service and returns all
the host bindings associated with it. This does
change the internal data structures, only reports on them.
LocateError is return when the kernel cannot find the requested service, given by a package name and service name pair.
UnmarshalFailed
2
UnmarshalFailed is used to indicate that in unmarshaling a request or result, the protobuf layer returned an error.
IdDispatch
3
IdDispatch means that a dispatch call failed due to an MethodId or ServiceId was not found. This is also used when binding a method if the name is invalid.
NamespaceExhausted
4
NamespaceExhausted is returned when the kernel can no along accept additional packages, services, or methods. This is used primarily to thwart attempts at DOS attacks.
NotFound
5
NotFound means that a package, service, or method that was requested could not be found.
DataTooLarge
6
DataTooLarge means that the size of some part of method call was bigger than the buffer allocated to receive it. This could be a problem either on the call side or the return side.
MarshalFailed
7
Marshal means that a marshal of a protobuf has failed.
CallerUnavailable
8
CallerUnavailable means that the kernel could not find the original caller that requested the computation for which results have been provided. It is most likely because the caller was killed, exited or timed out.
ServiceAlreadyClosedOrExported
9
KernelServiceAlreadyClosedOrExported means that some process has already reported the service in question as closed or has already expressed that it is exporting (implementing this service). This is very likely a case where there are two servers that think they are or should be implementing the same service.
ServiceAlreadyRequired
10
ServiceAlreadyRequired means that this same process has already required the given service.
DependencyCycle
11
DependencyCycle means that no deterministic startup ordering exists for the set of exports and requires in use. In other words, you must refactor your program so that you do not have a cyle to make it come up cleanly.
NetworkFailed
12
NetworkFailed means that we successfully connected to the nameserver, but failed during the communication process itself.
NetworkConnectionLost
13
NetworkConnectionLost means that our internal connection to the remote nameserver was either still working but has lost "sync" in the protocol or the connection has become entirely broken. The kernel will close the connection to remote nameserver and reestablish it after this error.
DataTooSmall
14
DataTooSmall means that the kernel was speaking some protocol with a remote server, such as a remote nameserver, and data read from the remote said was smaller than the protocol dictated, e.g. it did not contain a checksum after a data block.
KernelConnectionFailed
15
ConnectionFailed means that the attempt to open a connection to a remote service has failed to connect.
NSRetryFailed
16
NSRetryFailed means that we tried twice to reach the nameserver with the given request, but both times could not do so.
DecodeError
17
DecodeError indicates that an attempt to extract a protobuf object from an encoded set of bytes has failed. Typically, this means that the encoder was not called.
ExecError
18
ExecError means that we received a response from the implenter of a particular service's function and the execution of that function failed.
KernelDependencyFailure
19
DependencyFailure means that the dependency infrastructure has failed. This is different than when a user creates bad set of depedencies (KernelDependencyCycle). This an internal to the kernel error.
AbortRequest
20
AbortRequest indicates that the program that receives this error should exit because the nameserver has asked it to do so. This means that some other program has failed to start correctly, so this deployment cannot succeed.
EncodeError
22
EncodeError indicates that an attempt encode a protobuf with header and CRC has failed.
ClosedErr
23
ClosedErr indicates that that object is now closed. This is used as a signal when writing data between the guest and host.
GuestReadFailed
24
GuestReadFailed indicates that we did not successfully read from guest memory. This is usually caused by the proposed address to read from being out of bounds.
GuestWriteFailed
25
GuestWriteFailed indicates that we did not successfully write to guest memory. This is usually caused by the proposed address for writing to being out of bounds.
BadId
26
BadId indicates that you passed the zero value or the empty value of a an id type into a system call. This usually means that you did not properly initialize a protobuf.
NotReady
27
NotReady that the service that was trying to start was aborted because it returned false from Ready(). Usually this error indicates that the program has no way to continue running.
NotRequired
28
NotRequired that a service has tried to Locate() another service that that the first service did not Require() previously.
RunTimeout
29
RunTimeout means that the programs timeout has expired when waiting for all the required dependencies to be fulfilled.
ReadOneTimeout
30
ReadOneTimeout means that the program was trying to request a service/method pair to invoke, but the request timed out.
WriteTimeout
31
WriteTimeout means that the program was trying to send a request to another service, but timed out before it could do so.
BadCallId
32
BadCallId is returned when trying to match up the results and the call of a function resulting in a promise. It is returned if either there is no such cid registered yet or the cid is already in use.
ChannelClosed
33
ChannelClosed indicates that one of the internal channels used in waiting for input has been closed unexpectedly. is already in use.
ExitFailed
34
ExitFailed means that we were tyring to send an orderly shutdown but could not reach all the of the hosts that we needed to notify.
MarkDone returns the list of unmodified (not marked done) messages
remaining. In the normal case, this will be empty. If there was an error
trying to mark items as done, it returns the error and
puts the unmarked elements in the list unmodified
ReceiveTime is an approximation to the first time the message was received. If the message has never been received before, this will be the zero value.
Receive pulls the available messages from the queue and returns
them. Note that if multiple copies of the caller exist, the
caller must be prepared to receive the same message multiple
times.
If the queue msg id is an error then we are using the error_detail_msg to
return the value. Note that the message id you provide here will
changed once we send you the success notification using your id.
InvalidName means that the given queue name is a not a valid identifier. Identifiers must contain only ascii alphanumeric characters and the symbols ".", ",","_" and "-". The first letter of a queue name must be an alphabetic character.
InternalError
5
InternalError means that the queue's implementation (not the values) passed to it) is the problem. This is roughly a 500 not a 401. This is usually caused by a problem with the internal database used to store the queue items.
NoPayload
6
NoPayload is an error that means that an attempt was made to create a message a nil payload. Payloads are mandatory and senders are optional.
NotFound
7
NotFound means that the Queue name requested could not be found. This the queue equivalent of 404.
AlreadyExists
8
AlreadyExists means that the Queue name is already in use.
UnmarshalFailed
9
Unmarshal error means that we could not use the protobuf unmarshal successfully for a payload or sender.
Queue
Queue supports a reliable source of messages. Messages
may be delivered out of order or delivered multiple times.
CreateQueue creates a new named queue. This is useful primarily in preparing for a deployment, not during normal execution. See LocateQueue to find an already existing queue.
Receive a queued message. Just receiving a message does not imply that it is fully processed. You need to call delete or the message will be redelivered at a future point. Messages are not guaranteed to be received in the order sent. If there are no messages ready, the response will be returned with a nil message.
Mark a message as done and delete. This should only be done after the processing is completed. If you are worried about idempotentency in your processing,you will need to keep a record of which message Ids you have processed.
MarkDone returns the list of unmodified (not marked done) messages
remaining. In the normal case, this will be empty. If there was an error
trying to mark items as done, it returns the error and
puts the unmarked elements in the list unmodified
ReceiveTime is an approximation to the first time the message was received. If the message has never been received before, this will be the zero value.
Receive pulls the available messages from the queue and returns
them. Note that if multiple copies of the caller exist, the
caller must be prepared to receive the same message multiple
times.
If the queue msg id is an error then we are using the error_detail_msg to
return the value. Note that the message id you provide here will
changed once we send you the success notification using your id.
InvalidName means that the given queue name is a not a valid identifier. Identifiers must contain only ascii alphanumeric characters and the symbols ".", ",","_" and "-". The first letter of a queue name must be an alphabetic character.
InternalError
5
InternalError means that the queue's implementation (not the values) passed to it) is the problem. This is roughly a 500 not a 401. This is usually caused by a problem with the internal database used to store the queue items.
NoPayload
6
NoPayload is an error that means that an attempt was made to create a message a nil payload. Payloads are mandatory and senders are optional.
NotFound
7
NotFound means that the Queue name requested could not be found. This the queue equivalent of 404.
AlreadyExists
8
AlreadyExists means that the Queue name is already in use.
UnmarshalFailed
9
Unmarshal error means that we could not use the protobuf unmarshal successfully for a payload or sender.
Queue
Queue supports a reliable source of messages. Messages
may be delivered out of order or delivered multiple times.
CreateQueue creates a new named queue. This is useful primarily in preparing for a deployment, not during normal execution. See LocateQueue to find an already existing queue.
Receive a queued message. Just receiving a message does not imply that it is fully processed. You need to call delete or the message will be redelivered at a future point. Messages are not guaranteed to be received in the order sent. If there are no messages ready, the response will be returned with a nil message.
Mark a message as done and delete. This should only be done after the processing is completed. If you are worried about idempotentency in your processing,you will need to keep a record of which message Ids you have processed.
AddTestSuiteResponse contains a map that takes a tuple, written as
pkg.service.name, and maps it to a boolean to indicate if the given
tuple was added successfully.
Comparison result describes a single comparison that was done during
a test. This result is generally optional inside a ExecResult. The
name field is not the package, service, or function name, it is a name
that can used to narrow down to a single comparison. name can be "",
as can error_message. The error_id can be nil. These can be zero
value because they are not crucial to the display of the results, although
it is highly recommended that if the success == false, then one of
error_message or error_id is set.
ExecRequest is the type that flows from the TestService to the
package.service.func that is under test. The package, service, and
name are in the request message because the callee might be doing
trickery with names (see the map field in the SuiteInfo) and
thus needs to know what to emulate, dispatch, etc.
ExecResponse is what an object under test sends back to the TestService
describing the test outcome. A single package/service/name can have
many comparisons.
QueuePayload is the payload that is sent to the TestService via sending
and receiving items from the queue. Note that the TestSends these messages
during setup and retreives them in the background once the tests have started.
StartRequest is what the client should use to start the tests running.
The provided data is exclusive, if filter_suite is provided filter_name
may not be, and vice versa. Both the suite and name filters may be empty
to request running all tests. filter_name and filter_suite must be legal
golang regular expressions. Parallel is currently ignored.
StartResponse returns the number of tests that will be run, given
the filters provided in StartRequest. If regex_failed means that one
of the regex fields (filter_suite or filter_name) was not a valid
golang regex.
SuiteInfo is used to describe the set of test functions that a
suite has. The map provided goes from the logical name of the
test ("MyFunc") to the function the test service will actually
request ("MyTrickyDispatcher"). The key and value can be identical in
the simple case.
SuiteReportRequest is passed to the suite from the TestService and
contains overall information about the suite's tests. The maps have a key
that is the logical function name (the key in the map of SuiteRequest).
AddTestSuite adds all the elements in the request as suites to the TestService list. If you add a Suite more than once, the function lists are merged–the functions that were already present are retained and the response will show these tests as failures.
Start starts the TestManager running all the known tests, implicitly this includes all suites. If you give a suite filter the entire suite's tests are dropped if the suite name doesn't match the filter. For finer granularity you can supple a name filter which walks all the known tests and discards any test that doesn't match the filter.
UnderTest
UnderTest is the service that services should implement to be "under test" and
testable via Test.