API Reference
API Reference Manual
Complete Silly framework API documentation, including detailed descriptions of all modules, functions, parameters, and return values.
Core Modules
Core functionality of the framework, including coroutine scheduling, timers, signal handling, etc.
- silly - Core module
- silly.task - Coroutine task management
- silly.time - Timers and time management
- silly.signal - Unix signal handling
- silly.logger - Logging system
- silly.hive - Worker thread pool
Utility Modules
Development and operations tools, including console, debugger, hot reload, etc.
- silly.console - Interactive console
- silly.debugger - Interactive debugger
- silly.patch - Module hot reload
Data Structure Modules
Efficient data structure implementations for handling network data streams and queue management.
- silly.adt.buffer - Byte buffer
- silly.adt.queue - FIFO queue
Cryptographic Modules
Cryptography-related functionality, based on OpenSSL implementation.
- silly.crypto.cipher - Symmetric encryption (AES, DES, etc.)
- silly.crypto.hash - Hash functions (SHA256, MD5, etc.)
- silly.crypto.hmac - Message authentication codes (HMAC)
- silly.crypto.pkey - Asymmetric encryption (RSA, EC)
Encoding Modules
Data encoding and decoding utilities.
- silly.encoding.json - JSON encoding/decoding
- silly.encoding.base64 - Base64 encoding/decoding
Synchronization Modules
Coroutine synchronization primitives for coordination and communication between coroutines.
- silly.sync.mutex - Mutex lock
- silly.sync.channel - Channel (inter-coroutine communication)
- silly.sync.waitgroup - Wait group
Network Modules
Network-related functionality, including support for TCP, UDP, TLS, HTTP, and other protocols.
Basic Protocols
- silly.net - Network base module (low-level API)
- silly.net.tcp - TCP protocol
- silly.net.udp - UDP protocol
- silly.net.tls - TLS/SSL encryption
Application Protocols
- silly.net.http - HTTP/1.1 and HTTP/2 protocols
- silly.net.websocket - WebSocket protocol
- silly.net.grpc - gRPC protocol
- silly.net.dns - DNS domain name resolution
- silly.net.cluster - Distributed cluster communication
Storage Modules
Data storage and persistence, including relational databases, key-value stores, distributed configuration, etc.
- silly.store.mysql - MySQL database client
- silly.store.redis - Redis key-value store client
- silly.store.etcd - etcd distributed configuration store
Security Modules
Authentication and authorization related functionality.
- silly.security.jwt - JSON Web Token (JWT) authentication
Monitoring Modules
Application performance monitoring and metrics collection with Prometheus format export support.
Core Metric Types
- silly.metrics.counter - Counter (monotonically increasing)
- silly.metrics.gauge - Gauge (can increase or decrease)
- silly.metrics.histogram - Histogram (distribution statistics)
Metrics Management
- silly.metrics.prometheus - Prometheus integration (convenience wrapper)
- silly.metrics.registry - Metrics registry
- silly.metrics.collector - Custom collector interface
- silly.metrics.labels - Label management (internal module)
Usage Notes
- Information-Oriented: Accurate, dry technical descriptions
- Completeness: Covers all public APIs
- Searchable: Use search functionality to quickly find needed APIs
Related Resources
- Tutorials - Learn how to use
- How-To Guides - Solve specific problems
- Concepts - Understand design principles