
Official Go SDK for Fluxum API
Get up and running with the Fluxum Go SDK in minutes
go mod init your-project
go get fluxum/fluxum-sdk-goBuilt with Go's concurrency patterns and goroutines for high-performance applications.
Built-in client-side encryption with optional custom encryption keys for maximum security.
Comprehensive analytics tracking for connections, jobs, and rate limits with Go channels.
Handle real-time events with the SDK
val eventListener = MyEventListener{}
sdk.AddEventListener(eventListener)Examples of different job types and configurations
requestData := map[string]interface{}{
"url": "https://api.example.com/data",
"method": "GET",
"headers": map[string]string{
"Authorization": "Bearer your-token"
},
}
jobPayload := models.NewJobPayload(requestData)
jobID, err := sdk.SubmitJob(jobPayload)Advanced configuration and features
options := config.NewBuilder().
APIKey("your-api-key").
EnableClientSideEncryption(true).
EncryptionKey("your-custom-encryption-key").
Build()
sdk := fluxum.NewFluxumSDK(options)// Manual connection
sdk.connect()
// Disconnect
sdk.disconnect()
// Check connection status
if (sdk.isConnected()) {
fmt.Println("Connected")
}
// Reconnect
sdk.reconnect()// Get analytics data
analytics := sdk.getAnalytics()
fmt.Printf("Total jobs: %d
", analytics.totalJobs)
fmt.Printf("Successful jobs: %d
", analytics.successfulJobs)
fmt.Printf("Failed jobs: %d
", analytics.failedJobs)
fmt.Printf("Average response time: %v
", analytics.averageResponseTime)
// Reset analytics
sdk.resetAnalytics()Comprehensive error handling and recovery
val robustEventListener = MyEventListener{}
sdk.AddEventListener(robustEventListener)System requirements and dependencies
Go 1.21.0 or higher
Complete API documentation
fluxum.NewFluxumSDK(options *config.Options) *FluxumSDK
type Options struct {
APIKey string
AutoConnect bool
EnableAnalytics bool
EnableClientSideEncryption bool
MaxReconnectAttempts int
ReconnectDelay time.Duration
ConnectionTimeout time.Duration
LogLevel string
}// Connection
fun connect()
fun disconnect()
fun reconnect()
// Status
sdk.isConnected() -> bool
sdk.isAuthenticated() -> bool
// Jobs
fun submitJob(payload: JobPayload) -> str
fun cancelJob(jobId: string) error
// Analytics
fun getAnalytics() *AnalyticsData
fun resetAnalytics()
// Events
fun addEventListener(listener EventListener)
fun removeEventListener(listener EventListener)