Module
Module documentation.
moduleprotocol.memcache
Classes
Classes and inheritance.
classprotocol.memcache::Config
@brief`Config` type.
@details`Config` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Config {
/*
@brief `host` field.classprotocol.memcache::Error
@brief`Error` type.
@details`Error` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Error {
/*
@brief `kind` field.classprotocol.memcache::Item
@brief`Item` type.
@details`Item` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Item {
/*
@brief `key` field.classprotocol.memcache::Response
@brief`Response` type.
@details`Response` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Response {
/*
@brief `kind` field.classprotocol.memcache::ParseResult
@brief`ParseResult` type.
@details`ParseResult` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class ParseResult {
/*
@brief `value` field.classprotocol.memcache::Reader
@brief`Reader` type.
@details`Reader` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class Reader {
/*
@brief `buf` field.classprotocol.memcache::BinaryHeader
@brief`BinaryHeader` type.
@details`BinaryHeader` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class BinaryHeader {
/*
@brief `magic` field.classprotocol.memcache::BinaryFrame
@brief`BinaryFrame` type.
@details`BinaryFrame` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class BinaryFrame {
/*
@brief `header` field.classprotocol.memcache::UdpPacket
@brief`UdpPacket` type.
@details`UdpPacket` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class UdpPacket {
/*
@brief `request_id` field.classprotocol.memcache::UdpReassembly
@brief`UdpReassembly` type.
@details`UdpReassembly` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class UdpReassembly {
/*
@brief `request_id` field.classprotocol.memcache::MetaOptions
@brief`MetaOptions` type.
@details`MetaOptions` encapsulates state and operations exported by the system module. It commonly stores runtime handles, protocol state, buffers, configuration, or collection data. Its methods define the primary behavior for the type. If the type owns external resources, prefer `dispose` or `close` for deterministic release.
class MetaOptions {
/*
@brief `tokens` field.Functions
Free functions and class methods.
functionprotocol.memcache::Config.init
Signature
func init(self: protocol.memcache.Config) -> Void func init(self: protocol.memcache.Config) -> Void {
self.host = "127.0.0.1";
self.port = 11211;@briefInitializes a `Config` instance.
@detailsEstablishes the initial field state for `Config` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Config.deinit
Signature
func deinit(self: protocol.memcache.Config) -> Void func deinit(self: protocol.memcache.Config) -> Void {
}
}@briefReleases fallback resources at the end of the `Config` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Error.init
Signature
func init(self: protocol.memcache.Error) -> Void func init(self: protocol.memcache.Error) -> Void {
self.kind = protocol.memcache.MEMCACHE_ERR_NONE;
self.status = "";@briefInitializes a `Error` instance.
@detailsEstablishes the initial field state for `Error` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Error.deinit
Signature
func deinit(self: protocol.memcache.Error) -> Void func deinit(self: protocol.memcache.Error) -> Void {
}
}@briefReleases fallback resources at the end of the `Error` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Item.init
Signature
func init(self: protocol.memcache.Item) -> Void func init(self: protocol.memcache.Item) -> Void {
self.key = "";
self.value = "";@briefInitializes a `Item` instance.
@detailsEstablishes the initial field state for `Item` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Item.deinit
Signature
func deinit(self: protocol.memcache.Item) -> Void func deinit(self: protocol.memcache.Item) -> Void {
}
}@briefReleases fallback resources at the end of the `Item` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Response.init
Signature
func init(self: protocol.memcache.Response) -> Void func init(self: protocol.memcache.Response) -> Void {
self.kind = protocol.memcache.MEMCACHE_RESPONSE_EMPTY;
self.ok = false;@briefInitializes a `Response` instance.
@detailsEstablishes the initial field state for `Response` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Response.is_error
Signature
func is_error(self: protocol.memcache.Response) -> Bool func is_error(self: protocol.memcache.Response) -> Bool {
return self.error.kind != protocol.memcache.MEMCACHE_ERR_NONE;
}@briefTests whether the state satisfies the condition represented by `Response.is_error`.
@detailsExecutes the `is_error` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionprotocol.memcache::Response.first_item
Signature
func first_item(self: protocol.memcache.Response) -> protocol.memcache.Item, ErrCode func first_item(self: protocol.memcache.Response) -> protocol.memcache.Item, ErrCode {
if self.items.len() <= 0 {
return new protocol.memcache.Item(), std.ERR_NOT_FOUND;@briefProvides the system library operation `Response.first_item`.
@detailsExecutes the `first_item` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `protocol.memcache.Item, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::Response.deinit
Signature
func deinit(self: protocol.memcache.Response) -> Void func deinit(self: protocol.memcache.Response) -> Void {
}
}@briefReleases fallback resources at the end of the `Response` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::ParseResult.init
Signature
func init(self: protocol.memcache.ParseResult) -> Void func init(self: protocol.memcache.ParseResult) -> Void {
self.value = new protocol.memcache.Response();
self.consumed = 0;@briefInitializes a `ParseResult` instance.
@detailsEstablishes the initial field state for `ParseResult` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::ParseResult.deinit
Signature
func deinit(self: protocol.memcache.ParseResult) -> Void func deinit(self: protocol.memcache.ParseResult) -> Void {
}
}@briefReleases fallback resources at the end of the `ParseResult` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::Reader.init
Signature
func init(self: protocol.memcache.Reader, max_value_bytes: Int = 1048576, max_line_bytes: Int = 8192) -> Void func init(self: protocol.memcache.Reader, max_value_bytes: Int = 1048576, max_line_bytes: Int = 8192) -> Void {
self.buf = "";
self.max_value_bytes = max_value_bytes;@briefInitializes a `Reader` instance.
@detailsEstablishes the initial field state for `Reader` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- max_value_bytesMaximum allowed count or byte size.
- max_line_bytesMaximum allowed count or byte size.
@returnVoid
functionprotocol.memcache::Reader.feed
Signature
func feed(self: protocol.memcache.Reader, data: String) -> Void func feed(self: protocol.memcache.Reader, data: String) -> Void {
self.buf += data;
}@briefProvides the system library operation `Reader.feed`.
@detailsExecutes the `feed` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- dataInput or output data buffer.
@returnVoid
functionprotocol.memcache::Reader.buffered_len
Signature
func buffered_len(self: protocol.memcache.Reader) -> Int func buffered_len(self: protocol.memcache.Reader) -> Int {
return std.len(self.buf);
}@briefProvides the system library operation `Reader.buffered_len`.
@detailsExecutes the `buffered_len` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::Reader.next
Signature
func next(self: protocol.memcache.Reader) -> protocol.memcache.Response, ErrCode func next(self: protocol.memcache.Reader) -> protocol.memcache.Response, ErrCode {
let parsed: protocol.memcache.ParseResult = protocol.memcache.parse_one(self.buf, 0, self.max_value_bytes, self.max_line_bytes)?;
if !parsed.complete {@briefProvides the system library operation `Reader.next`.
@detailsExecutes the `next` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns `protocol.memcache.Response, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::Reader.deinit
Signature
func deinit(self: protocol.memcache.Reader) -> Void func deinit(self: protocol.memcache.Reader) -> Void {
}
}@briefReleases fallback resources at the end of the `Reader` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::BinaryHeader.init
Signature
func init(self: protocol.memcache.BinaryHeader) -> Void func init(self: protocol.memcache.BinaryHeader) -> Void {
self.magic = 0;
self.opcode = 0;@briefInitializes a `BinaryHeader` instance.
@detailsEstablishes the initial field state for `BinaryHeader` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::BinaryHeader.deinit
Signature
func deinit(self: protocol.memcache.BinaryHeader) -> Void func deinit(self: protocol.memcache.BinaryHeader) -> Void {
}
}@briefReleases fallback resources at the end of the `BinaryHeader` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::BinaryFrame.init
Signature
func init(self: protocol.memcache.BinaryFrame) -> Void func init(self: protocol.memcache.BinaryFrame) -> Void {
self.header = new protocol.memcache.BinaryHeader();
self.extras = "";@briefInitializes a `BinaryFrame` instance.
@detailsEstablishes the initial field state for `BinaryFrame` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::BinaryFrame.deinit
Signature
func deinit(self: protocol.memcache.BinaryFrame) -> Void func deinit(self: protocol.memcache.BinaryFrame) -> Void {
}
}@briefReleases fallback resources at the end of the `BinaryFrame` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::UdpPacket.init
Signature
func init(self: protocol.memcache.UdpPacket) -> Void func init(self: protocol.memcache.UdpPacket) -> Void {
self.request_id = 0;
self.sequence = 0;@briefInitializes a `UdpPacket` instance.
@detailsEstablishes the initial field state for `UdpPacket` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::UdpPacket.deinit
Signature
func deinit(self: protocol.memcache.UdpPacket) -> Void func deinit(self: protocol.memcache.UdpPacket) -> Void {
}
}@briefReleases fallback resources at the end of the `UdpPacket` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::UdpReassembly.init
Signature
func init(self: protocol.memcache.UdpReassembly, request_id: Int = 0, total: Int = 0) -> Void func init(self: protocol.memcache.UdpReassembly, request_id: Int = 0, total: Int = 0) -> Void {
self.request_id = request_id;
self.total = total;@briefInitializes a `UdpReassembly` instance.
@detailsEstablishes the initial field state for `UdpReassembly` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- request_idProtocol request identifier used to correlate frames, commands, or responses.
- totalTotal number of bytes, elements, rows, or operations accumulated by the caller.
@returnVoid
functionprotocol.memcache::UdpReassembly.add
Signature
func add(self: protocol.memcache.UdpReassembly, packet: protocol.memcache.UdpPacket) -> ErrCode func add(self: protocol.memcache.UdpReassembly, packet: protocol.memcache.UdpPacket) -> ErrCode {
if packet.request_id != self.request_id || packet.total != self.total || packet.sequence < 0 || packet.sequence >= self.total {
return std.ERR_INVALID;@briefProvides the system library operation `UdpReassembly.add`.
@detailsExecutes the `add` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- packetProtocol packet payload decoded, encoded, or transmitted by the operation.
@returnReturns `ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::UdpReassembly.complete
Signature
func complete(self: protocol.memcache.UdpReassembly) -> Bool func complete(self: protocol.memcache.UdpReassembly) -> Bool {
return self.total > 0 && self.count == self.total;
}@briefProvides the system library operation `UdpReassembly.complete`.
@detailsExecutes the `complete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionprotocol.memcache::UdpReassembly.payload
Signature
func payload(self: protocol.memcache.UdpReassembly) -> String func payload(self: protocol.memcache.UdpReassembly) -> String {
let out: String = "";
loop (let packet_index: Int = 0; packet_index < self.parts.len(); packet_index += 1) {@briefProvides the system library operation `UdpReassembly.payload`.
@detailsExecutes the `payload` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `String`.
functionprotocol.memcache::UdpReassembly.deinit
Signature
func deinit(self: protocol.memcache.UdpReassembly) -> Void func deinit(self: protocol.memcache.UdpReassembly) -> Void {
}
}@briefReleases fallback resources at the end of the `UdpReassembly` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::MetaOptions.init
Signature
func init(self: protocol.memcache.MetaOptions) -> Void func init(self: protocol.memcache.MetaOptions) -> Void {
self.tokens = new collections.Vector<String>();
}@briefInitializes a `MetaOptions` instance.
@detailsEstablishes the initial field state for `MetaOptions` so other methods can be called safely. Constructor logic should keep fields consistent and avoid leaking partially initialized resources.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::MetaOptions.add
Signature
func add(self: protocol.memcache.MetaOptions, token: String) -> protocol.memcache.MetaOptions func add(self: protocol.memcache.MetaOptions, token: String) -> protocol.memcache.MetaOptions {
_ = self.tokens.push(token);
return self;@briefProvides the system library operation `MetaOptions.add`.
@detailsExecutes the `add` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- tokenToken string used for parsing, authentication, or protocol correlation.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.value
Signature
func value(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func value(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("v");
}@briefProvides the system library operation `MetaOptions.value`.
@detailsExecutes the `value` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.cas
Signature
func cas(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func cas(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("c");
}@briefProvides the system library operation `MetaOptions.cas`.
@detailsExecutes the `cas` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.ttl
Signature
func ttl(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func ttl(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("t");
}@briefProvides the system library operation `MetaOptions.ttl`.
@detailsExecutes the `ttl` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.size
Signature
func size(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func size(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("s");
}@briefProvides the system library operation `MetaOptions.size`.
@detailsExecutes the `size` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.flags
Signature
func flags(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func flags(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("f");
}@briefProvides the system library operation `MetaOptions.flags`.
@detailsExecutes the `flags` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.stale
Signature
func stale(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func stale(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.mark_stale();
}@briefProvides the system library operation `MetaOptions.stale`.
@detailsExecutes the `stale` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.mark_stale
Signature
func mark_stale(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func mark_stale(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("I");
}@briefProvides the system library operation `MetaOptions.mark_stale`.
@detailsExecutes the `mark_stale` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.invalidate
Signature
func invalidate(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func invalidate(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.mark_stale();
}@briefProvides the system library operation `MetaOptions.invalidate`.
@detailsExecutes the `invalidate` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.vivify
Signature
func vivify(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions func vivify(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions {
return self.add("N" + strconv.itoa(ttl_sec));
}@briefProvides the system library operation `MetaOptions.vivify`.
@detailsExecutes the `vivify` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.recache
Signature
func recache(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions func recache(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions {
return self.add("R" + strconv.itoa(ttl_sec));
}@briefProvides the system library operation `MetaOptions.recache`.
@detailsExecutes the `recache` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.update_ttl
Signature
func update_ttl(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions func update_ttl(self: protocol.memcache.MetaOptions, ttl_sec: Int) -> protocol.memcache.MetaOptions {
return self.add("T" + strconv.itoa(ttl_sec));
}@briefProvides the system library operation `MetaOptions.update_ttl`.
@detailsExecutes the `update_ttl` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.client_flags
Signature
func client_flags(self: protocol.memcache.MetaOptions, flags: String) -> protocol.memcache.MetaOptions func client_flags(self: protocol.memcache.MetaOptions, flags: String) -> protocol.memcache.MetaOptions {
return self.add("F" + flags);
}@briefProvides the system library operation `MetaOptions.client_flags`.
@detailsExecutes the `client_flags` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.opaque
Signature
func opaque(self: protocol.memcache.MetaOptions, token: String) -> protocol.memcache.MetaOptions func opaque(self: protocol.memcache.MetaOptions, token: String) -> protocol.memcache.MetaOptions {
return self.add("O" + token);
}@briefProvides the system library operation `MetaOptions.opaque`.
@detailsExecutes the `opaque` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- tokenToken string used for parsing, authentication, or protocol correlation.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.quiet
Signature
func quiet(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func quiet(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("q");
}@briefProvides the system library operation `MetaOptions.quiet`.
@detailsExecutes the `quiet` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.no_value_on_success
Signature
func no_value_on_success(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions func no_value_on_success(self: protocol.memcache.MetaOptions) -> protocol.memcache.MetaOptions {
return self.add("h");
}@briefProvides the system library operation `MetaOptions.no_value_on_success`.
@detailsExecutes the `no_value_on_success` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.compare_cas
Signature
func compare_cas(self: protocol.memcache.MetaOptions, cas: UInt64) -> protocol.memcache.MetaOptions func compare_cas(self: protocol.memcache.MetaOptions, cas: UInt64) -> protocol.memcache.MetaOptions {
return self.add("C" + strconv.format_uint64(cas));
}@briefProvides the system library operation `MetaOptions.compare_cas`.
@detailsExecutes the `compare_cas` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.mode
Signature
func mode(self: protocol.memcache.MetaOptions, mode_text: String) -> protocol.memcache.MetaOptions func mode(self: protocol.memcache.MetaOptions, mode_text: String) -> protocol.memcache.MetaOptions {
return self.add("M" + mode_text);
}@briefProvides the system library operation `MetaOptions.mode`.
@detailsExecutes the `mode` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
- mode_textText representation of the mode value encoded into a command.
@returnReturns the operation result as `protocol.memcache.MetaOptions`.
functionprotocol.memcache::MetaOptions.deinit
Signature
func deinit(self: protocol.memcache.MetaOptions) -> Void func deinit(self: protocol.memcache.MetaOptions) -> Void {
}
}@briefReleases fallback resources at the end of the `MetaOptions` lifetime.
@detailsThis destructor hook is called by object lifetime management to clean up underlying resources that were not released explicitly. Normal application code should prefer `dispose`, `close`, or the module-specific close function to release resources at a deterministic time.
@param
- selfThe current instance whose fields, handles, buffers, or external resources are read or modified by this method.
@returnVoid
functionprotocol.memcache::default_port
Signature
func default_port() -> Intfunc default_port() -> Int {
return 11211;
}@briefProvides the system library operation `default_port`.
@detailsExecutes the `default_port` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::crlf
Signature
func crlf() -> Stringfunc crlf() -> String {
return "\r\n";
}@briefProvides the system library operation `crlf`.
@detailsExecutes the `crlf` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `String`.
functionprotocol.memcache::byte
Signature
func byte(n: Int) -> Stringfunc byte(n: Int) -> String {
return encoding.byte_from_code(n & 255);
}@briefProvides the system library operation `byte`.
@detailsExecutes the `byte` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- nCount, size, or limit value.
@returnReturns the operation result as `String`.
functionprotocol.memcache::byte_at
Signature
func byte_at(s: String, idx: Int) -> Intfunc byte_at(s: String, idx: Int) -> Int {
return std.byte_at(s, idx) & 255;
}@briefProvides the system library operation `byte_at`.
@detailsExecutes the `byte_at` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- idxZero-based index.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::u16_be
Signature
func u16_be(n: Int) -> Stringfunc u16_be(n: Int) -> String {
return protocol.memcache.byte(n >> 8) + protocol.memcache.byte(n);
}@briefProvides the system library operation `u16_be`.
@detailsExecutes the `u16_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- nCount, size, or limit value.
@returnReturns the operation result as `String`.
functionprotocol.memcache::u32_be
Signature
func u32_be(n: Int) -> Stringfunc u32_be(n: Int) -> String {
let out: String = protocol.memcache.byte(n >> 24);
out += protocol.memcache.byte(n >> 16);@briefProvides the system library operation `u32_be`.
@detailsExecutes the `u32_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- nCount, size, or limit value.
@returnReturns the operation result as `String`.
functionprotocol.memcache::u64_be
Signature
func u64_be(n: UInt64) -> Stringfunc u64_be(n: UInt64) -> String {
let out: String = protocol.memcache.byte((n >> 56) => Int);
out += protocol.memcache.byte((n >> 48) => Int);@briefProvides the system library operation `u64_be`.
@detailsExecutes the `u64_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- nCount, size, or limit value.
@returnReturns the operation result as `String`.
functionprotocol.memcache::read_u16_be
Signature
func read_u16_be(s: String, off: Int) -> Intfunc read_u16_be(s: String, off: Int) -> Int {
return (protocol.memcache.byte_at(s, off) << 8) | protocol.memcache.byte_at(s, off + 1);
}@briefReads data with `read_u16_be`.
@detailsExecutes the `read_u16_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::read_u32_be
Signature
func read_u32_be(s: String, off: Int) -> Intfunc read_u32_be(s: String, off: Int) -> Int {
return (protocol.memcache.byte_at(s, off) << 24)
| (protocol.memcache.byte_at(s, off + 1) << 16)@briefReads data with `read_u32_be`.
@detailsExecutes the `read_u32_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::read_u64_be
Signature
func read_u64_be(s: String, off: Int) -> UInt64func read_u64_be(s: String, off: Int) -> UInt64 {
let out: UInt64 = 0;
loop (let i: Int = 0; i < 8; i += 1) {@briefReads data with `read_u64_be`.
@detailsExecutes the `read_u64_be` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
- offZero-based byte offset or element offset at which the operation starts.
@returnReturns the operation result as `UInt64`.
functionprotocol.memcache::args
Signature
func args(items: ...String) -> collections.Vector<String>func args(items: ...String) -> collections.Vector<String> {
let out: collections.Vector<String> = new collections.Vector<String>();
loop (let item_index: Int = 0; item_index < items.len(); item_index += 1) {@briefProvides the system library operation `args`.
@detailsExecutes the `args` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- itemsCollection of items inserted, removed, encoded, or returned by the operation.
@returnReturns the operation result as `collections.Vector<String>`.
functionprotocol.memcache::join_args
Signature
func join_args(parts: collections.Vector<String>) -> Stringfunc join_args(parts: collections.Vector<String>) -> String {
let out: String = "";
loop (let part_index: Int = 0; part_index < parts.len(); part_index += 1) {@briefProvides the system library operation `join_args`.
@detailsExecutes the `join_args` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- partsOrdered collection of string or protocol fragments joined, encoded, or inspected by the operation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_command
Signature
func encode_command(parts: collections.Vector<String>, payload: String = "") -> Stringfunc encode_command(parts: collections.Vector<String>, payload: String = "") -> String {
let wire: String = protocol.memcache.join_args(parts) + protocol.memcache.crlf();
if std.len(payload) > 0 {@briefEncodes input data with `encode_command`.
@detailsExecutes the `encode_command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- partsOrdered collection of string or protocol fragments joined, encoded, or inspected by the operation.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_command_items
Signature
func encode_command_items(items: ...String) -> Stringfunc encode_command_items(items: ...String) -> String {
return protocol.memcache.encode_command(items, "");
}@briefEncodes input data with `encode_command_items`.
@detailsExecutes the `encode_command_items` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- itemsCollection of items inserted, removed, encoded, or returned by the operation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_storage
Signature
func encode_storage(command_name: String, key: String, flags: Int, ttl_sec: Int, value: String) -> Stringfunc encode_storage(command_name: String, key: String, flags: Int, ttl_sec: Int, value: String) -> String {
let parts: collections.Vector<String> = protocol.memcache.args(command_name, key, strconv.itoa(flags), strconv.itoa(ttl_sec), strconv.itoa(std.len(value)));
return protocol.memcache.encode_command(parts, value);@briefEncodes input data with `encode_storage`.
@detailsExecutes the `encode_storage` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- command_nameProtocol command name to encode, send, dispatch, or execute.
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- valueValue to write or store.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_storage_noreply
Signature
func encode_storage_noreply(command_name: String, key: String, flags: Int, ttl_sec: Int, value: String) -> Stringfunc encode_storage_noreply(command_name: String, key: String, flags: Int, ttl_sec: Int, value: String) -> String {
let parts: collections.Vector<String> = protocol.memcache.args(command_name, key, strconv.itoa(flags), strconv.itoa(ttl_sec), strconv.itoa(std.len(value)), "noreply");
return protocol.memcache.encode_command(parts, value);@briefEncodes input data with `encode_storage_noreply`.
@detailsExecutes the `encode_storage_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- command_nameProtocol command name to encode, send, dispatch, or execute.
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- valueValue to write or store.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_delete
Signature
func encode_delete(key: String, noreply: Bool = false) -> Stringfunc encode_delete(key: String, noreply: Bool = false) -> String {
if noreply {
return protocol.memcache.encode_command(protocol.memcache.args("delete", key, "noreply"), "");@briefEncodes input data with `encode_delete`.
@detailsExecutes the `encode_delete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- noreplyWhether the protocol command suppresses a server response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_delta
Signature
func encode_delta(command_name: String, key: String, delta: UInt64, noreply: Bool = false) -> Stringfunc encode_delta(command_name: String, key: String, delta: UInt64, noreply: Bool = false) -> String {
if noreply {
return protocol.memcache.encode_command(protocol.memcache.args(command_name, key, strconv.format_uint64(delta), "noreply"), "");@briefEncodes input data with `encode_delta`.
@detailsExecutes the `encode_delta` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- command_nameProtocol command name to encode, send, dispatch, or execute.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
- noreplyWhether the protocol command suppresses a server response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_touch
Signature
func encode_touch(key: String, ttl_sec: Int, noreply: Bool = false) -> Stringfunc encode_touch(key: String, ttl_sec: Int, noreply: Bool = false) -> String {
if noreply {
return protocol.memcache.encode_command(protocol.memcache.args("touch", key, strconv.itoa(ttl_sec), "noreply"), "");@briefEncodes input data with `encode_touch`.
@detailsExecutes the `encode_touch` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- noreplyWhether the protocol command suppresses a server response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_flush_all
Signature
func encode_flush_all(delay_sec: Int = 0, noreply: Bool = false) -> Stringfunc encode_flush_all(delay_sec: Int = 0, noreply: Bool = false) -> String {
let parts: collections.Vector<String> = new collections.Vector<String>();
_ = parts.push("flush_all");@briefEncodes input data with `encode_flush_all`.
@detailsExecutes the `encode_flush_all` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- delay_secDelay duration in seconds before retrying, expiring, or executing work.
- noreplyWhether the protocol command suppresses a server response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_cas
Signature
func encode_cas(key: String, flags: Int, ttl_sec: Int, value: String, cas: UInt64) -> Stringfunc encode_cas(key: String, flags: Int, ttl_sec: Int, value: String, cas: UInt64) -> String {
let parts: collections.Vector<String> = protocol.memcache.args("cas", key, strconv.itoa(flags), strconv.itoa(ttl_sec), strconv.itoa(std.len(value)), strconv.format_uint64(cas));
return protocol.memcache.encode_command(parts, value);@briefEncodes input data with `encode_cas`.
@detailsExecutes the `encode_cas` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- valueValue to write or store.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_cas_noreply
Signature
func encode_cas_noreply(key: String, flags: Int, ttl_sec: Int, value: String, cas: UInt64) -> Stringfunc encode_cas_noreply(key: String, flags: Int, ttl_sec: Int, value: String, cas: UInt64) -> String {
let parts: collections.Vector<String> = protocol.memcache.args("cas", key, strconv.itoa(flags), strconv.itoa(ttl_sec), strconv.itoa(std.len(value)), strconv.format_uint64(cas), "noreply");
return protocol.memcache.encode_command(parts, value);@briefEncodes input data with `encode_cas_noreply`.
@detailsExecutes the `encode_cas_noreply` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- valueValue to write or store.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_auth
Signature
func encode_auth(username: String, password: String) -> Stringfunc encode_auth(username: String, password: String) -> String {
let payload: String = username + " " + password;
return protocol.memcache.encode_storage("set", "auth", 0, 0, payload);@briefEncodes input data with `encode_auth`.
@detailsExecutes the `encode_auth` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- usernameUser name supplied for authentication or account lookup.
- passwordPassword or authentication secret supplied to the protocol login flow.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_meta_get
Signature
func encode_meta_get(key: String, flags: collections.Vector<String>) -> Stringfunc encode_meta_get(key: String, flags: collections.Vector<String>) -> String {
let parts: collections.Vector<String> = new collections.Vector<String>();
_ = parts.push("mg");@briefEncodes input data with `encode_meta_get`.
@detailsExecutes the `encode_meta_get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_meta_get_options
Signature
func encode_meta_get_options(key: String, opts: protocol.memcache.MetaOptions) -> Stringfunc encode_meta_get_options(key: String, opts: protocol.memcache.MetaOptions) -> String {
return protocol.memcache.encode_meta_get(key, opts.tokens);
}@briefEncodes input data with `encode_meta_get_options`.
@detailsExecutes the `encode_meta_get_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- optsOption flags or option object that customizes the operation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_meta_set
Signature
func encode_meta_set(key: String, value: String, flags: collections.Vector<String>) -> Stringfunc encode_meta_set(key: String, value: String, flags: collections.Vector<String>) -> String {
let parts: collections.Vector<String> = new collections.Vector<String>();
_ = parts.push("ms");@briefEncodes input data with `encode_meta_set`.
@detailsExecutes the `encode_meta_set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_meta_set_options
Signature
func encode_meta_set_options(key: String, value: String, opts: protocol.memcache.MetaOptions) -> Stringfunc encode_meta_set_options(key: String, value: String, opts: protocol.memcache.MetaOptions) -> String {
return protocol.memcache.encode_meta_set(key, value, opts.tokens);
}@briefEncodes input data with `encode_meta_set_options`.
@detailsExecutes the `encode_meta_set_options` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- valueValue to write or store.
- optsOption flags or option object that customizes the operation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_meta_command
Signature
func encode_meta_command(command_name: String, key: String, opts: protocol.memcache.MetaOptions) -> Stringfunc encode_meta_command(command_name: String, key: String, opts: protocol.memcache.MetaOptions) -> String {
let parts: collections.Vector<String> = new collections.Vector<String>();
_ = parts.push(command_name);@briefEncodes input data with `encode_meta_command`.
@detailsExecutes the `encode_meta_command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- command_nameProtocol command name to encode, send, dispatch, or execute.
- keyKey name.
- optsOption flags or option object that customizes the operation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_udp_packet
Signature
func encode_udp_packet(request_id: Int, sequence: Int, total: Int, payload: String) -> Stringfunc encode_udp_packet(request_id: Int, sequence: Int, total: Int, payload: String) -> String {
let out: String = protocol.memcache.u16_be(request_id);
out += protocol.memcache.u16_be(sequence);@briefEncodes input data with `encode_udp_packet`.
@detailsExecutes the `encode_udp_packet` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- request_idProtocol request identifier used to correlate frames, commands, or responses.
- sequenceSequence number used to order or correlate protocol messages.
- totalTotal number of bytes, elements, rows, or operations accumulated by the caller.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::parse_udp_packet
Signature
func parse_udp_packet(data: String) -> protocol.memcache.UdpPacket, ErrCodefunc parse_udp_packet(data: String) -> protocol.memcache.UdpPacket, ErrCode {
if std.len(data) < 8 {
let empty_packet: protocol.memcache.UdpPacket = new protocol.memcache.UdpPacket();@briefParses input data with `parse_udp_packet`.
@detailsExecutes the `parse_udp_packet` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- dataInput or output data buffer.
@returnReturns `protocol.memcache.UdpPacket, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::split_udp_request
Signature
func split_udp_request(request_id: Int, payload: String, max_bytes: Int = 1400) -> collections.Vector<String>, ErrCodefunc split_udp_request(request_id: Int, payload: String, max_bytes: Int = 1400) -> collections.Vector<String>, ErrCode {
let out: collections.Vector<String> = new collections.Vector<String>();
let payload_limit: Int = max_bytes - 8;@briefProvides the system library operation `split_udp_request`.
@detailsExecutes the `split_udp_request` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- request_idProtocol request identifier used to correlate frames, commands, or responses.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
- max_bytesMaximum number of bytes to read or process in this operation.
@returnReturns `collections.Vector<String>, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::make_status
Signature
func make_status(status: String, ok: Bool) -> protocol.memcache.Responsefunc make_status(status: String, ok: Bool) -> protocol.memcache.Response {
let out: protocol.memcache.Response = new protocol.memcache.Response();
out.kind = protocol.memcache.MEMCACHE_RESPONSE_STATUS;@briefProvides the system library operation `make_status`.
@detailsExecutes the `make_status` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- statusStatus value, status text, or protocol status field processed by the operation.
- okBoolean success value or status flag produced by the operation.
@returnReturns the operation result as `protocol.memcache.Response`.
functionprotocol.memcache::make_binary_response
Signature
func make_binary_response(frame: protocol.memcache.BinaryFrame) -> protocol.memcache.Responsefunc make_binary_response(frame: protocol.memcache.BinaryFrame) -> protocol.memcache.Response {
let out: protocol.memcache.Response = new protocol.memcache.Response();
out.kind = protocol.memcache.MEMCACHE_RESPONSE_BINARY;@briefProvides the system library operation `make_binary_response`.
@detailsExecutes the `make_binary_response` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- frameProtocol frame decoded, encoded, sent, or received by the operation.
@returnReturns the operation result as `protocol.memcache.Response`.
functionprotocol.memcache::error_from_status
Signature
func error_from_status(status: String) -> protocol.memcache.Errorfunc error_from_status(status: String) -> protocol.memcache.Error {
let err: protocol.memcache.Error = new protocol.memcache.Error();
let upper: String = strings.to_upper_ascii(status);@briefProvides the system library operation `error_from_status`.
@detailsExecutes the `error_from_status` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- statusStatus value, status text, or protocol status field processed by the operation.
@returnReturns the operation result as `protocol.memcache.Error`.
functionprotocol.memcache::error_from_binary_status
Signature
func error_from_binary_status(status_code: Int, message: String) -> protocol.memcache.Errorfunc error_from_binary_status(status_code: Int, message: String) -> protocol.memcache.Error {
let err: protocol.memcache.Error = new protocol.memcache.Error();
if status_code == protocol.memcache.binary_status_ok() {@briefProvides the system library operation `error_from_binary_status`.
@detailsExecutes the `error_from_binary_status` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- status_codeNumeric status code carried by the protocol response.
- messageMessage text or payload delivered to the caller, log, or protocol peer.
@returnReturns the operation result as `protocol.memcache.Error`.
functionprotocol.memcache::split_words
Signature
func split_words(line: String) -> collections.Vector<String>func split_words(line: String) -> collections.Vector<String> {
let out: collections.Vector<String> = new collections.Vector<String>();
let i: Int = 0;@briefProvides the system library operation `split_words`.
@detailsExecutes the `split_words` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- lineSingle input line or line-oriented buffer processed by the operation.
@returnReturns the operation result as `collections.Vector<String>`.
functionprotocol.memcache::parse_one
Signature
func parse_one(buf: String, start: Int = 0, max_value_bytes: Int = 1048576, max_line_bytes: Int = 8192) -> protocol.memcache.ParseResult, ErrCodefunc parse_one(buf: String, start: Int = 0, max_value_bytes: Int = 1048576, max_line_bytes: Int = 8192) -> protocol.memcache.ParseResult, ErrCode {
let out: protocol.memcache.ParseResult = new protocol.memcache.ParseResult();
if start >= std.len(buf) {@briefParses input data with `parse_one`.
@detailsExecutes the `parse_one` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- bufBuffer object or native buffer pointer used for reading, writing, or temporary storage.
- startZero-based starting index, byte offset, or range boundary for the operation.
- max_value_bytesMaximum allowed count or byte size.
- max_line_bytesMaximum allowed count or byte size.
@returnReturns `protocol.memcache.ParseResult, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionprotocol.memcache::status_is_success
Signature
func status_is_success(status: String) -> Boolfunc status_is_success(status: String) -> Bool {
if status == "STORED" || status == "DELETED" || status == "TOUCHED" || status == "OK" || status == "END" || protocol.memcache.line_is_integer(status) {
return true;@briefProvides the system library operation `status_is_success`.
@detailsExecutes the `status_is_success` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- statusStatus value, status text, or protocol status field processed by the operation.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionprotocol.memcache::line_is_integer
Signature
func line_is_integer(s: String) -> Boolfunc line_is_integer(s: String) -> Bool {
if std.len(s) <= 0 {
return false;@briefProvides the system library operation `line_is_integer`.
@detailsExecutes the `line_is_integer` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sInput string.
@returnReturns a boolean result; true means the condition holds or the operation succeeded.
functionprotocol.memcache::binary_opcode_get
Signature
func binary_opcode_get() -> Intfunc binary_opcode_get() -> Int {
return 0;
}@briefProvides the system library operation `binary_opcode_get`.
@detailsExecutes the `binary_opcode_get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_getk
Signature
func binary_opcode_getk() -> Intfunc binary_opcode_getk() -> Int {
return 12;
}@briefProvides the system library operation `binary_opcode_getk`.
@detailsExecutes the `binary_opcode_getk` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_getkq
Signature
func binary_opcode_getkq() -> Intfunc binary_opcode_getkq() -> Int {
return 13;
}@briefProvides the system library operation `binary_opcode_getkq`.
@detailsExecutes the `binary_opcode_getkq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_append
Signature
func binary_opcode_append() -> Intfunc binary_opcode_append() -> Int {
return 14;
}@briefProvides the system library operation `binary_opcode_append`.
@detailsExecutes the `binary_opcode_append` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_prepend
Signature
func binary_opcode_prepend() -> Intfunc binary_opcode_prepend() -> Int {
return 15;
}@briefProvides the system library operation `binary_opcode_prepend`.
@detailsExecutes the `binary_opcode_prepend` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_set
Signature
func binary_opcode_set() -> Intfunc binary_opcode_set() -> Int {
return 1;
}@briefProvides the system library operation `binary_opcode_set`.
@detailsExecutes the `binary_opcode_set` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_add
Signature
func binary_opcode_add() -> Intfunc binary_opcode_add() -> Int {
return 2;
}@briefProvides the system library operation `binary_opcode_add`.
@detailsExecutes the `binary_opcode_add` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_replace
Signature
func binary_opcode_replace() -> Intfunc binary_opcode_replace() -> Int {
return 3;
}@briefProvides the system library operation `binary_opcode_replace`.
@detailsExecutes the `binary_opcode_replace` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_delete
Signature
func binary_opcode_delete() -> Intfunc binary_opcode_delete() -> Int {
return 4;
}@briefProvides the system library operation `binary_opcode_delete`.
@detailsExecutes the `binary_opcode_delete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_increment
Signature
func binary_opcode_increment() -> Intfunc binary_opcode_increment() -> Int {
return 5;
}@briefProvides the system library operation `binary_opcode_increment`.
@detailsExecutes the `binary_opcode_increment` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_decrement
Signature
func binary_opcode_decrement() -> Intfunc binary_opcode_decrement() -> Int {
return 6;
}@briefProvides the system library operation `binary_opcode_decrement`.
@detailsExecutes the `binary_opcode_decrement` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_quit
Signature
func binary_opcode_quit() -> Intfunc binary_opcode_quit() -> Int {
return 7;
}@briefProvides the system library operation `binary_opcode_quit`.
@detailsExecutes the `binary_opcode_quit` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_flush
Signature
func binary_opcode_flush() -> Intfunc binary_opcode_flush() -> Int {
return 8;
}@briefProvides the system library operation `binary_opcode_flush`.
@detailsExecutes the `binary_opcode_flush` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_getq
Signature
func binary_opcode_getq() -> Intfunc binary_opcode_getq() -> Int {
return 9;
}@briefProvides the system library operation `binary_opcode_getq`.
@detailsExecutes the `binary_opcode_getq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_noop
Signature
func binary_opcode_noop() -> Intfunc binary_opcode_noop() -> Int {
return 10;
}@briefProvides the system library operation `binary_opcode_noop`.
@detailsExecutes the `binary_opcode_noop` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_version
Signature
func binary_opcode_version() -> Intfunc binary_opcode_version() -> Int {
return 11;
}@briefProvides the system library operation `binary_opcode_version`.
@detailsExecutes the `binary_opcode_version` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_stat
Signature
func binary_opcode_stat() -> Intfunc binary_opcode_stat() -> Int {
return 16;
}@briefProvides the system library operation `binary_opcode_stat`.
@detailsExecutes the `binary_opcode_stat` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_setq
Signature
func binary_opcode_setq() -> Intfunc binary_opcode_setq() -> Int {
return 17;
}@briefProvides the system library operation `binary_opcode_setq`.
@detailsExecutes the `binary_opcode_setq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_addq
Signature
func binary_opcode_addq() -> Intfunc binary_opcode_addq() -> Int {
return 18;
}@briefProvides the system library operation `binary_opcode_addq`.
@detailsExecutes the `binary_opcode_addq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_replaceq
Signature
func binary_opcode_replaceq() -> Intfunc binary_opcode_replaceq() -> Int {
return 19;
}@briefProvides the system library operation `binary_opcode_replaceq`.
@detailsExecutes the `binary_opcode_replaceq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_deleteq
Signature
func binary_opcode_deleteq() -> Intfunc binary_opcode_deleteq() -> Int {
return 20;
}@briefProvides the system library operation `binary_opcode_deleteq`.
@detailsExecutes the `binary_opcode_deleteq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_incrementq
Signature
func binary_opcode_incrementq() -> Intfunc binary_opcode_incrementq() -> Int {
return 21;
}@briefProvides the system library operation `binary_opcode_incrementq`.
@detailsExecutes the `binary_opcode_incrementq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_decrementq
Signature
func binary_opcode_decrementq() -> Intfunc binary_opcode_decrementq() -> Int {
return 22;
}@briefProvides the system library operation `binary_opcode_decrementq`.
@detailsExecutes the `binary_opcode_decrementq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_quitq
Signature
func binary_opcode_quitq() -> Intfunc binary_opcode_quitq() -> Int {
return 23;
}@briefProvides the system library operation `binary_opcode_quitq`.
@detailsExecutes the `binary_opcode_quitq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_flushq
Signature
func binary_opcode_flushq() -> Intfunc binary_opcode_flushq() -> Int {
return 24;
}@briefProvides the system library operation `binary_opcode_flushq`.
@detailsExecutes the `binary_opcode_flushq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_appendq
Signature
func binary_opcode_appendq() -> Intfunc binary_opcode_appendq() -> Int {
return 25;
}@briefProvides the system library operation `binary_opcode_appendq`.
@detailsExecutes the `binary_opcode_appendq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_prependq
Signature
func binary_opcode_prependq() -> Intfunc binary_opcode_prependq() -> Int {
return 26;
}@briefProvides the system library operation `binary_opcode_prependq`.
@detailsExecutes the `binary_opcode_prependq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_touch
Signature
func binary_opcode_touch() -> Intfunc binary_opcode_touch() -> Int {
return 28;
}@briefProvides the system library operation `binary_opcode_touch`.
@detailsExecutes the `binary_opcode_touch` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_gat
Signature
func binary_opcode_gat() -> Intfunc binary_opcode_gat() -> Int {
return 29;
}@briefProvides the system library operation `binary_opcode_gat`.
@detailsExecutes the `binary_opcode_gat` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_gatq
Signature
func binary_opcode_gatq() -> Intfunc binary_opcode_gatq() -> Int {
return 30;
}@briefProvides the system library operation `binary_opcode_gatq`.
@detailsExecutes the `binary_opcode_gatq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_sasl_list_mechs
Signature
func binary_opcode_sasl_list_mechs() -> Intfunc binary_opcode_sasl_list_mechs() -> Int {
return 32;
}@briefProvides the system library operation `binary_opcode_sasl_list_mechs`.
@detailsExecutes the `binary_opcode_sasl_list_mechs` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_sasl_auth
Signature
func binary_opcode_sasl_auth() -> Intfunc binary_opcode_sasl_auth() -> Int {
return 33;
}@briefProvides the system library operation `binary_opcode_sasl_auth`.
@detailsExecutes the `binary_opcode_sasl_auth` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_opcode_sasl_step
Signature
func binary_opcode_sasl_step() -> Intfunc binary_opcode_sasl_step() -> Int {
return 34;
}@briefProvides the system library operation `binary_opcode_sasl_step`.
@detailsExecutes the `binary_opcode_sasl_step` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_magic_request
Signature
func binary_magic_request() -> Intfunc binary_magic_request() -> Int {
return 128;
}@briefProvides the system library operation `binary_magic_request`.
@detailsExecutes the `binary_magic_request` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_magic_response
Signature
func binary_magic_response() -> Intfunc binary_magic_response() -> Int {
return 129;
}@briefProvides the system library operation `binary_magic_response`.
@detailsExecutes the `binary_magic_response` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_ok
Signature
func binary_status_ok() -> Intfunc binary_status_ok() -> Int {
return 0;
}@briefProvides the system library operation `binary_status_ok`.
@detailsExecutes the `binary_status_ok` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_key_not_found
Signature
func binary_status_key_not_found() -> Intfunc binary_status_key_not_found() -> Int {
return 1;
}@briefProvides the system library operation `binary_status_key_not_found`.
@detailsExecutes the `binary_status_key_not_found` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_key_exists
Signature
func binary_status_key_exists() -> Intfunc binary_status_key_exists() -> Int {
return 2;
}@briefProvides the system library operation `binary_status_key_exists`.
@detailsExecutes the `binary_status_key_exists` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_value_too_large
Signature
func binary_status_value_too_large() -> Intfunc binary_status_value_too_large() -> Int {
return 3;
}@briefProvides the system library operation `binary_status_value_too_large`.
@detailsExecutes the `binary_status_value_too_large` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_invalid_arguments
Signature
func binary_status_invalid_arguments() -> Intfunc binary_status_invalid_arguments() -> Int {
return 4;
}@briefProvides the system library operation `binary_status_invalid_arguments`.
@detailsExecutes the `binary_status_invalid_arguments` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_item_not_stored
Signature
func binary_status_item_not_stored() -> Intfunc binary_status_item_not_stored() -> Int {
return 5;
}@briefProvides the system library operation `binary_status_item_not_stored`.
@detailsExecutes the `binary_status_item_not_stored` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_non_numeric
Signature
func binary_status_non_numeric() -> Intfunc binary_status_non_numeric() -> Int {
return 6;
}@briefProvides the system library operation `binary_status_non_numeric`.
@detailsExecutes the `binary_status_non_numeric` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_unknown_command
Signature
func binary_status_unknown_command() -> Intfunc binary_status_unknown_command() -> Int {
return 129;
}@briefProvides the system library operation `binary_status_unknown_command`.
@detailsExecutes the `binary_status_unknown_command` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_out_of_memory
Signature
func binary_status_out_of_memory() -> Intfunc binary_status_out_of_memory() -> Int {
return 130;
}@briefProvides the system library operation `binary_status_out_of_memory`.
@detailsExecutes the `binary_status_out_of_memory` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_auth_error
Signature
func binary_status_auth_error() -> Intfunc binary_status_auth_error() -> Int {
return 32;
}@briefProvides the system library operation `binary_status_auth_error`.
@detailsExecutes the `binary_status_auth_error` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_auth_continue
Signature
func binary_status_auth_continue() -> Intfunc binary_status_auth_continue() -> Int {
return 33;
}@briefProvides the system library operation `binary_status_auth_continue`.
@detailsExecutes the `binary_status_auth_continue` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@returnReturns the operation result as `Int`.
functionprotocol.memcache::binary_status_name
Signature
func binary_status_name(status_code: Int) -> Stringfunc binary_status_name(status_code: Int) -> String {
return match status_code {
0 => "OK",@briefProvides the system library operation `binary_status_name`.
@detailsExecutes the `binary_status_name` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- status_codeNumeric status code carried by the protocol response.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_request
Signature
func encode_binary_request(opcode: Int, key: String, extras: String = "", value: String = "", opaque: Int = 0, cas: UInt64 = 0) -> Stringfunc encode_binary_request(opcode: Int, key: String, extras: String = "", value: String = "", opaque: Int = 0, cas: UInt64 = 0) -> String {
let body_len: Int = std.len(extras) + std.len(key) + std.len(value);
let out: String = protocol.memcache.byte(protocol.memcache.binary_magic_request());@briefEncodes input data with `encode_binary_request`.
@detailsExecutes the `encode_binary_request` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- opcodeProtocol opcode that identifies the frame or command type.
- keyKey name.
- extrasExtra protocol fields, command arguments, or metadata supplied by the caller.
- valueValue to write or store.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_get
Signature
func encode_binary_get(key: String, opaque: Int = 0) -> Stringfunc encode_binary_get(key: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_get(), key, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_get`.
@detailsExecutes the `encode_binary_get` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_getq
Signature
func encode_binary_getq(key: String, opaque: Int = 0) -> Stringfunc encode_binary_getq(key: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_getq(), key, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_getq`.
@detailsExecutes the `encode_binary_getq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_getk
Signature
func encode_binary_getk(key: String, opaque: Int = 0) -> Stringfunc encode_binary_getk(key: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_getk(), key, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_getk`.
@detailsExecutes the `encode_binary_getk` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_getkq
Signature
func encode_binary_getkq(key: String, opaque: Int = 0) -> Stringfunc encode_binary_getkq(key: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_getkq(), key, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_getkq`.
@detailsExecutes the `encode_binary_getkq` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_storage
Signature
func encode_binary_storage(opcode: Int, key: String, value: String, flags: Int, ttl_sec: Int, opaque: Int = 0, cas: UInt64 = 0) -> Stringfunc encode_binary_storage(opcode: Int, key: String, value: String, flags: Int, ttl_sec: Int, opaque: Int = 0, cas: UInt64 = 0) -> String {
let extras: String = protocol.memcache.u32_be(flags) + protocol.memcache.u32_be(ttl_sec);
return protocol.memcache.encode_binary_request(opcode, key, extras, value, opaque, cas);@briefEncodes input data with `encode_binary_storage`.
@detailsExecutes the `encode_binary_storage` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- opcodeProtocol opcode that identifies the frame or command type.
- keyKey name.
- valueValue to write or store.
- flagsBitmask of option flags that controls how the operation is performed.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_delete
Signature
func encode_binary_delete(key: String, opaque: Int = 0) -> Stringfunc encode_binary_delete(key: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_delete(), key, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_delete`.
@detailsExecutes the `encode_binary_delete` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_append
Signature
func encode_binary_append(opcode: Int, key: String, value: String, opaque: Int = 0, cas: UInt64 = 0) -> Stringfunc encode_binary_append(opcode: Int, key: String, value: String, opaque: Int = 0, cas: UInt64 = 0) -> String {
return protocol.memcache.encode_binary_request(opcode, key, "", value, opaque, cas);
}@briefEncodes input data with `encode_binary_append`.
@detailsExecutes the `encode_binary_append` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- opcodeProtocol opcode that identifies the frame or command type.
- keyKey name.
- valueValue to write or store.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
- casCompare-and-swap token used to perform conditional cache updates.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_counter
Signature
func encode_binary_counter(opcode: Int, key: String, delta: UInt64, initial: UInt64 = 0, ttl_sec: Int = -1, opaque: Int = 0) -> Stringfunc encode_binary_counter(opcode: Int, key: String, delta: UInt64, initial: UInt64 = 0, ttl_sec: Int = -1, opaque: Int = 0) -> String {
let expiration: Int = ttl_sec;
let extras: String = protocol.memcache.u64_be(delta) + protocol.memcache.u64_be(initial) + protocol.memcache.u32_be(expiration);@briefEncodes input data with `encode_binary_counter`.
@detailsExecutes the `encode_binary_counter` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- opcodeProtocol opcode that identifies the frame or command type.
- keyKey name.
- deltaSigned amount added to or subtracted from the current numeric value.
- initialInitial value used to seed the state before processing begins.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_flush
Signature
func encode_binary_flush(delay_sec: Int = 0, opaque: Int = 0) -> Stringfunc encode_binary_flush(delay_sec: Int = 0, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_flush(), "", protocol.memcache.u32_be(delay_sec), "", opaque, 0);
}@briefEncodes input data with `encode_binary_flush`.
@detailsExecutes the `encode_binary_flush` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- delay_secDelay duration in seconds before retrying, expiring, or executing work.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_simple
Signature
func encode_binary_simple(opcode: Int, opaque: Int = 0) -> Stringfunc encode_binary_simple(opcode: Int, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(opcode, "", "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_simple`.
@detailsExecutes the `encode_binary_simple` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- opcodeProtocol opcode that identifies the frame or command type.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_sasl_auth
Signature
func encode_binary_sasl_auth(mechanism: String, payload: String, opaque: Int = 0) -> Stringfunc encode_binary_sasl_auth(mechanism: String, payload: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_sasl_auth(), mechanism, "", payload, opaque, 0);
}@briefEncodes input data with `encode_binary_sasl_auth`.
@detailsExecutes the `encode_binary_sasl_auth` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- mechanismAuthentication or protocol mechanism name selected by the caller.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_sasl_step
Signature
func encode_binary_sasl_step(mechanism: String, payload: String, opaque: Int = 0) -> Stringfunc encode_binary_sasl_step(mechanism: String, payload: String, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_sasl_step(), mechanism, "", payload, opaque, 0);
}@briefEncodes input data with `encode_binary_sasl_step`.
@detailsExecutes the `encode_binary_sasl_step` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- mechanismAuthentication or protocol mechanism name selected by the caller.
- payloadPayload bytes or text carried by the protocol frame, request, or response.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_stat
Signature
func encode_binary_stat(section: String = "", opaque: Int = 0) -> Stringfunc encode_binary_stat(section: String = "", opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_stat(), section, "", "", opaque, 0);
}@briefEncodes input data with `encode_binary_stat`.
@detailsExecutes the `encode_binary_stat` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- sectionNamed section, segment, or record group processed by the operation.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_touch
Signature
func encode_binary_touch(key: String, ttl_sec: Int, opaque: Int = 0) -> Stringfunc encode_binary_touch(key: String, ttl_sec: Int, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_touch(), key, protocol.memcache.u32_be(ttl_sec), "", opaque, 0);
}@briefEncodes input data with `encode_binary_touch`.
@detailsExecutes the `encode_binary_touch` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
functionprotocol.memcache::encode_binary_gat
Signature
func encode_binary_gat(key: String, ttl_sec: Int, opaque: Int = 0) -> Stringfunc encode_binary_gat(key: String, ttl_sec: Int, opaque: Int = 0) -> String {
return protocol.memcache.encode_binary_request(protocol.memcache.binary_opcode_gat(), key, protocol.memcache.u32_be(ttl_sec), "", opaque, 0);
}@briefEncodes input data with `encode_binary_gat`.
@detailsExecutes the `encode_binary_gat` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
- keyKey name.
- ttl_secTime-to-live duration in seconds before the stored value or protocol entry expires.
- opaqueOpaque protocol or runtime value preserved and echoed without interpretation.
@returnReturns the operation result as `String`.
Variables
Class fields (var).
varprotocol.memcache::Config.host
Type
String@brief`host` field.
@detailsStores a host name or network address. The field type is `String`, and it is maintained by the constructors and methods of `Config`.
var host: String;
/*
@brief `port` field.varprotocol.memcache::Config.port
Type
Int@brief`port` field.
@detailsStores a port number. The field type is `Int`, and it is maintained by the constructors and methods of `Config`.
var port: Int;
/*
@brief `username` field.varprotocol.memcache::Config.username
Type
String@brief`username` field.
@detailsHolds the `username` value for each `Config` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var username: String;
/*
@brief `password` field.varprotocol.memcache::Config.password
Type
String@brief`password` field.
@detailsHolds the `password` value for each `Config` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var password: String;
/*
@brief `protocol_mode` field.varprotocol.memcache::Config.protocol_mode
Type
protocol.memcache.ProtocolMode@brief`protocol_mode` field.
@detailsHolds the `protocol_mode` value for each `Config` instance. The field type is `protocol.memcache.ProtocolMode`, and constructors and methods keep it synchronized with the object's runtime state.
var protocol_mode: protocol.memcache.ProtocolMode;
/*
@brief `timeout_ms` field.varprotocol.memcache::Config.timeout_ms
Type
Int@brief`timeout_ms` field.
@detailsStores the default timeout in milliseconds. The field type is `Int`, and it is maintained by the constructors and methods of `Config`.
var timeout_ms: Int;
/*
@brief `read_timeout_ms` field.varprotocol.memcache::Config.read_timeout_ms
Type
Int@brief`read_timeout_ms` field.
@detailsHolds the `read_timeout_ms` value for each `Config` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var read_timeout_ms: Int;
/*
@brief `write_timeout_ms` field.varprotocol.memcache::Config.write_timeout_ms
Type
Int@brief`write_timeout_ms` field.
@detailsHolds the `write_timeout_ms` value for each `Config` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var write_timeout_ms: Int;
/*
@brief `use_tls` field.varprotocol.memcache::Config.use_tls
Type
Bool@brief`use_tls` field.
@detailsHolds the `use_tls` value for each `Config` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var use_tls: Bool;
/*
@brief `tls_verify` field.varprotocol.memcache::Config.tls_verify
Type
Bool@brief`tls_verify` field.
@detailsHolds the `tls_verify` value for each `Config` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var tls_verify: Bool;
/*
@brief `tls_ca_file` field.varprotocol.memcache::Config.tls_ca_file
Type
String@brief`tls_ca_file` field.
@detailsHolds the `tls_ca_file` value for each `Config` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var tls_ca_file: String;
/*
@brief `tcp_nodelay` field.varprotocol.memcache::Config.tcp_nodelay
Type
Bool@brief`tcp_nodelay` field.
@detailsHolds the `tcp_nodelay` value for each `Config` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var tcp_nodelay: Bool;
/*
@brief `keepalive` field.varprotocol.memcache::Config.keepalive
Type
Bool@brief`keepalive` field.
@detailsHolds the `keepalive` value for each `Config` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var keepalive: Bool;
/*
@brief `max_value_bytes` field.varprotocol.memcache::Config.max_value_bytes
Type
Int@brief`max_value_bytes` field.
@detailsHolds the `max_value_bytes` value for each `Config` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_value_bytes: Int;
/*
@brief `max_line_bytes` field.varprotocol.memcache::Config.max_line_bytes
Type
Int@brief`max_line_bytes` field.
@detailsHolds the `max_line_bytes` value for each `Config` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_line_bytes: Int;
/*varprotocol.memcache::Error.kind
Type
protocol.memcache.ErrorKind@brief`kind` field.
@detailsHolds the `kind` value for each `Error` instance. The field type is `protocol.memcache.ErrorKind`, and constructors and methods keep it synchronized with the object's runtime state.
var kind: protocol.memcache.ErrorKind;
/*
@brief `status` field.varprotocol.memcache::Error.status
Type
String@brief`status` field.
@detailsHolds the `status` value for each `Error` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var status: String;
/*
@brief `message` field.varprotocol.memcache::Error.message
Type
String@brief`message` field.
@detailsHolds the `message` value for each `Error` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var message: String;
/*
@brief `retriable` field.varprotocol.memcache::Error.retriable
Type
Bool@brief`retriable` field.
@detailsHolds the `retriable` value for each `Error` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var retriable: Bool;
/*varprotocol.memcache::Item.key
Type
String@brief`key` field.
@detailsHolds the `key` value for each `Item` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var key: String;
/*
@brief `value` field.varprotocol.memcache::Item.value
Type
String@brief`value` field.
@detailsHolds the `value` value for each `Item` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var value: String;
/*
@brief `flags` field.varprotocol.memcache::Item.flags
Type
Int@brief`flags` field.
@detailsHolds the `flags` value for each `Item` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var flags: Int;
/*
@brief `bytes_len` field.varprotocol.memcache::Item.bytes_len
Type
Int@brief`bytes_len` field.
@detailsHolds the `bytes_len` value for each `Item` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var bytes_len: Int;
/*
@brief `cas` field.varprotocol.memcache::Item.cas
Type
UInt64@brief`cas` field.
@detailsHolds the `cas` value for each `Item` instance. The field type is `UInt64`, and constructors and methods keep it synchronized with the object's runtime state.
var cas: UInt64;
/*
@brief `ttl_sec` field.varprotocol.memcache::Item.ttl_sec
Type
Int@brief`ttl_sec` field.
@detailsHolds the `ttl_sec` value for each `Item` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var ttl_sec: Int;
/*
@brief `client_flags` field.varprotocol.memcache::Item.client_flags
Type
String@brief`client_flags` field.
@detailsHolds the `client_flags` value for each `Item` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var client_flags: String;
/*
@brief `meta_tokens` field.varprotocol.memcache::Item.meta_tokens
Type
collections.Vector<String>@brief`meta_tokens` field.
@detailsHolds the `meta_tokens` value for each `Item` instance. The field type is `collections.Vector<String>`, and constructors and methods keep it synchronized with the object's runtime state.
var meta_tokens: collections.Vector<String>;
/*varprotocol.memcache::Response.kind
Type
protocol.memcache.ResponseKind@brief`kind` field.
@detailsHolds the `kind` value for each `Response` instance. The field type is `protocol.memcache.ResponseKind`, and constructors and methods keep it synchronized with the object's runtime state.
var kind: protocol.memcache.ErrorKind;
/*
@brief `status` field.varprotocol.memcache::Response.ok
Type
Bool@brief`ok` field.
@detailsIndicates whether the operation or state is valid. The field type is `Bool`, and it is maintained by the constructors and methods of `Response`.
var ok: Bool;
/*
@brief `status` field.varprotocol.memcache::Response.status
Type
String@brief`status` field.
@detailsHolds the `status` value for each `Response` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var status: String;
/*
@brief `message` field.varprotocol.memcache::Response.message
Type
String@brief`message` field.
@detailsHolds the `message` value for each `Response` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var message: String;
/*
@brief `retriable` field.varprotocol.memcache::Response.items
Type
collections.Vector<protocol.memcache.Item>@brief`items` field.
@detailsHolds the `items` value for each `Response` instance. The field type is `collections.Vector<protocol.memcache.Item>`, and constructors and methods keep it synchronized with the object's runtime state.
var items: collections.Vector<protocol.memcache.Item>;
/*
@brief `stats` field.varprotocol.memcache::Response.stats
Type
collections.Map<String, String>@brief`stats` field.
@detailsHolds the `stats` value for each `Response` instance. The field type is `collections.Map<String, String>`, and constructors and methods keep it synchronized with the object's runtime state.
var stats: collections.Map<String, String>;
/*
@brief `int_value` field.varprotocol.memcache::Response.int_value
Type
UInt64@brief`int_value` field.
@detailsHolds the `int_value` value for each `Response` instance. The field type is `UInt64`, and constructors and methods keep it synchronized with the object's runtime state.
var int_value: UInt64;
/*
@brief `tokens` field.varprotocol.memcache::Response.tokens
Type
collections.Vector<String>@brief`tokens` field.
@detailsHolds the `tokens` value for each `Response` instance. The field type is `collections.Vector<String>`, and constructors and methods keep it synchronized with the object's runtime state.
var tokens: collections.Vector<String>;
/*
@brief `error` field.varprotocol.memcache::Response.error
Type
protocol.memcache.Error@brief`error` field.
@detailsHolds the `error` value for each `Response` instance. The field type is `protocol.memcache.Error`, and constructors and methods keep it synchronized with the object's runtime state.
var error: protocol.memcache.Error;
/*
@brief `binary_header` field.varprotocol.memcache::Response.binary_header
Type
protocol.memcache.BinaryHeader@brief`binary_header` field.
@detailsHolds the `binary_header` value for each `Response` instance. The field type is `protocol.memcache.BinaryHeader`, and constructors and methods keep it synchronized with the object's runtime state.
var binary_header: protocol.memcache.BinaryHeader;
/*
@brief `extras` field.varprotocol.memcache::Response.extras
Type
String@brief`extras` field.
@detailsHolds the `extras` value for each `Response` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var extras: String;
/*
@brief `key` field.varprotocol.memcache::Response.key
Type
String@brief`key` field.
@detailsHolds the `key` value for each `Response` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var key: String;
/*
@brief `value` field.varprotocol.memcache::Response.value
Type
String@brief`value` field.
@detailsHolds the `value` value for each `Response` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var value: String;
/*
@brief `flags` field.varprotocol.memcache::ParseResult.value
Type
protocol.memcache.Response@brief`value` field.
@detailsHolds the `value` value for each `ParseResult` instance. The field type is `protocol.memcache.Response`, and constructors and methods keep it synchronized with the object's runtime state.
var value: String;
/*
@brief `flags` field.varprotocol.memcache::ParseResult.consumed
Type
Int@brief`consumed` field.
@detailsHolds the `consumed` value for each `ParseResult` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var consumed: Int;
/*
@brief `complete` field.varprotocol.memcache::ParseResult.complete
Type
Bool@brief`complete` field.
@detailsHolds the `complete` value for each `ParseResult` instance. The field type is `Bool`, and constructors and methods keep it synchronized with the object's runtime state.
var complete: Bool;
/*varprotocol.memcache::Reader.buf
Type
String@brief`buf` field.
@detailsStores the internal buffer. The field type is `String`, and it is maintained by the constructors and methods of `Reader`.
var buf: String;
/*
@brief `max_value_bytes` field.varprotocol.memcache::Reader.max_value_bytes
Type
Int@brief`max_value_bytes` field.
@detailsHolds the `max_value_bytes` value for each `Reader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_value_bytes: Int;
/*
@brief `max_line_bytes` field.varprotocol.memcache::Reader.max_line_bytes
Type
Int@brief`max_line_bytes` field.
@detailsHolds the `max_line_bytes` value for each `Reader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var max_line_bytes: Int;
/*varprotocol.memcache::BinaryHeader.magic
Type
Int@brief`magic` field.
@detailsHolds the `magic` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var magic: Int;
/*
@brief `opcode` field.varprotocol.memcache::BinaryHeader.opcode
Type
Int@brief`opcode` field.
@detailsHolds the `opcode` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var opcode: Int;
/*
@brief `key_length` field.varprotocol.memcache::BinaryHeader.key_length
Type
Int@brief`key_length` field.
@detailsHolds the `key_length` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var key_length: Int;
/*
@brief `extras_length` field.varprotocol.memcache::BinaryHeader.extras_length
Type
Int@brief`extras_length` field.
@detailsHolds the `extras_length` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var extras_length: Int;
/*
@brief `data_type` field.varprotocol.memcache::BinaryHeader.data_type
Type
Int@brief`data_type` field.
@detailsHolds the `data_type` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var data_type: Int;
/*
@brief `status_or_vbucket` field.varprotocol.memcache::BinaryHeader.status_or_vbucket
Type
Int@brief`status_or_vbucket` field.
@detailsHolds the `status_or_vbucket` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var status_or_vbucket: Int;
/*
@brief `total_body_length` field.varprotocol.memcache::BinaryHeader.total_body_length
Type
Int@brief`total_body_length` field.
@detailsHolds the `total_body_length` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var total_body_length: Int;
/*
@brief `opaque` field.varprotocol.memcache::BinaryHeader.opaque
Type
Int@brief`opaque` field.
@detailsHolds the `opaque` value for each `BinaryHeader` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var opaque: Int;
/*
@brief `cas` field.varprotocol.memcache::BinaryHeader.cas
Type
UInt64@brief`cas` field.
@detailsHolds the `cas` value for each `BinaryHeader` instance. The field type is `UInt64`, and constructors and methods keep it synchronized with the object's runtime state.
var cas: UInt64;
/*
@brief `ttl_sec` field.varprotocol.memcache::BinaryFrame.header
Type
protocol.memcache.BinaryHeader@brief`header` field.
@detailsHolds the `header` value for each `BinaryFrame` instance. The field type is `protocol.memcache.BinaryHeader`, and constructors and methods keep it synchronized with the object's runtime state.
var header: protocol.memcache.BinaryHeader;
/*
@brief `extras` field.varprotocol.memcache::BinaryFrame.extras
Type
String@brief`extras` field.
@detailsHolds the `extras` value for each `BinaryFrame` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var extras: String;
/*
@brief `key` field.varprotocol.memcache::BinaryFrame.key
Type
String@brief`key` field.
@detailsHolds the `key` value for each `BinaryFrame` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var key: String;
/*
@brief `value` field.varprotocol.memcache::BinaryFrame.value
Type
String@brief`value` field.
@detailsHolds the `value` value for each `BinaryFrame` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var value: String;
/*
@brief `flags` field.varprotocol.memcache::UdpPacket.request_id
Type
Int@brief`request_id` field.
@detailsHolds the `request_id` value for each `UdpPacket` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var request_id: Int;
/*
@brief `sequence` field.varprotocol.memcache::UdpPacket.sequence
Type
Int@brief`sequence` field.
@detailsHolds the `sequence` value for each `UdpPacket` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var sequence: Int;
/*
@brief `total` field.varprotocol.memcache::UdpPacket.total
Type
Int@brief`total` field.
@detailsHolds the `total` value for each `UdpPacket` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var total_body_length: Int;
/*
@brief `opaque` field.varprotocol.memcache::UdpPacket.reserved
Type
Int@brief`reserved` field.
@detailsHolds the `reserved` value for each `UdpPacket` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var reserved: Int;
/*
@brief `payload` field.varprotocol.memcache::UdpPacket.payload
Type
String@brief`payload` field.
@detailsHolds the `payload` value for each `UdpPacket` instance. The field type is `String`, and constructors and methods keep it synchronized with the object's runtime state.
var payload: String;
/*varprotocol.memcache::UdpReassembly.request_id
Type
Int@brief`request_id` field.
@detailsHolds the `request_id` value for each `UdpReassembly` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var request_id: Int;
/*
@brief `sequence` field.varprotocol.memcache::UdpReassembly.total
Type
Int@brief`total` field.
@detailsHolds the `total` value for each `UdpReassembly` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var total_body_length: Int;
/*
@brief `opaque` field.varprotocol.memcache::UdpReassembly.parts
Type
collections.Vector<String>@brief`parts` field.
@detailsHolds the `parts` value for each `UdpReassembly` instance. The field type is `collections.Vector<String>`, and constructors and methods keep it synchronized with the object's runtime state.
var parts: collections.Vector<String>;
/*
@brief `seen` field.varprotocol.memcache::UdpReassembly.seen
Type
collections.Vector<Bool>@brief`seen` field.
@detailsHolds the `seen` value for each `UdpReassembly` instance. The field type is `collections.Vector<Bool>`, and constructors and methods keep it synchronized with the object's runtime state.
var seen: collections.Vector<Bool>;
/*
@brief `count` field.varprotocol.memcache::UdpReassembly.count
Type
Int@brief`count` field.
@detailsHolds the `count` value for each `UdpReassembly` instance. The field type is `Int`, and constructors and methods keep it synchronized with the object's runtime state.
var count: Int;
/*varprotocol.memcache::MetaOptions.tokens
Type
collections.Vector<String>@brief`tokens` field.
@detailsHolds the `tokens` value for each `MetaOptions` instance. The field type is `collections.Vector<String>`, and constructors and methods keep it synchronized with the object's runtime state.
var tokens: collections.Vector<String>;
/*
@brief `error` field.