diff --git a/pkg/client/README.md b/pkg/client/README.md index 87653cf..d094c98 100644 --- a/pkg/client/README.md +++ b/pkg/client/README.md @@ -16,7 +16,7 @@ This package provides a Go client for connecting to a Kevo database server. The ## Installation ```bash -go get github.com/jeremytregunna/kevo +go get github.com/KevoDB/kevo ``` ## Quick Start @@ -29,48 +29,48 @@ import ( "fmt" "log" - "github.com/jeremytregunna/kevo/pkg/client" - _ "github.com/jeremytregunna/kevo/pkg/grpc/transport" // Register gRPC transport + "github.com/KevoDB/kevo/pkg/client" + _ "github.com/KevoDB/kevo/pkg/grpc/transport" // Register gRPC transport ) func main() { // Create a client with default options options := client.DefaultClientOptions() options.Endpoint = "localhost:50051" - + c, err := client.NewClient(options) if err != nil { log.Fatalf("Failed to create client: %v", err) } - + // Connect to the server ctx := context.Background() if err := c.Connect(ctx); err != nil { log.Fatalf("Failed to connect: %v", err) } defer c.Close() - + // Basic key-value operations key := []byte("hello") value := []byte("world") - + // Store a value if _, err := c.Put(ctx, key, value, true); err != nil { log.Fatalf("Put failed: %v", err) } - + // Retrieve a value val, found, err := c.Get(ctx, key) if err != nil { log.Fatalf("Get failed: %v", err) } - + if found { fmt.Printf("Value: %s\n", val) } else { fmt.Println("Key not found") } - + // Delete a value if _, err := c.Delete(ctx, key, true); err != nil { log.Fatalf("Delete failed: %v", err) @@ -90,20 +90,20 @@ options := client.ClientOptions{ RequestTimeout: 10 * time.Second, TransportType: "grpc", PoolSize: 5, - + // Security options TLSEnabled: true, CertFile: "/path/to/cert.pem", KeyFile: "/path/to/key.pem", CAFile: "/path/to/ca.pem", - + // Retry options MaxRetries: 3, InitialBackoff: 100 * time.Millisecond, MaxBackoff: 2 * time.Second, BackoffFactor: 1.5, RetryJitter: 0.2, - + // Performance options Compression: client.CompressionGzip, MaxMessageSize: 16 * 1024 * 1024, // 16MB @@ -223,4 +223,4 @@ success, err := client.Compact(ctx, false) // force=false if err != nil { log.Fatalf("Compaction failed: %v", err) } -``` \ No newline at end of file +``` diff --git a/proto/kevo/service.proto b/proto/kevo/service.proto index b55706e..02204fa 100644 --- a/proto/kevo/service.proto +++ b/proto/kevo/service.proto @@ -2,35 +2,35 @@ syntax = "proto3"; package kevo; -option go_package = "github.com/jeremytregunna/kevo/pkg/grpc/proto;proto"; +option go_package = "github.com/KevoDB/kevo/pkg/grpc/proto;proto"; service KevoService { // Key-Value Operations rpc Get(GetRequest) returns (GetResponse); rpc Put(PutRequest) returns (PutResponse); rpc Delete(DeleteRequest) returns (DeleteResponse); - + // Batch Operations rpc BatchWrite(BatchWriteRequest) returns (BatchWriteResponse); - + // Iterator Operations rpc Scan(ScanRequest) returns (stream ScanResponse); - + // Transaction Operations rpc BeginTransaction(BeginTransactionRequest) returns (BeginTransactionResponse); rpc CommitTransaction(CommitTransactionRequest) returns (CommitTransactionResponse); rpc RollbackTransaction(RollbackTransactionRequest) returns (RollbackTransactionResponse); - + // Transaction Operations within an active transaction rpc TxGet(TxGetRequest) returns (TxGetResponse); rpc TxPut(TxPutRequest) returns (TxPutResponse); rpc TxDelete(TxDeleteRequest) returns (TxDeleteResponse); rpc TxScan(TxScanRequest) returns (stream TxScanResponse); - + // Administrative Operations rpc GetStats(GetStatsRequest) returns (GetStatsResponse); rpc Compact(CompactRequest) returns (CompactResponse); - + // Replication and Topology Operations rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse); } @@ -176,7 +176,7 @@ message GetStatsResponse { int32 sstable_count = 4; double write_amplification = 5; double read_amplification = 6; - + // Operation counts map operation_counts = 7; // Latency statistics @@ -214,7 +214,7 @@ message CompactResponse { bool success = 1; } -// Node information and topology +// Node information and topology message GetNodeInfoRequest { // No parameters needed for now } @@ -227,11 +227,11 @@ message GetNodeInfoResponse { REPLICA = 2; } NodeRole node_role = 1; - + // Connection information string primary_address = 2; // Empty if standalone repeated ReplicaInfo replicas = 3; // Empty if standalone - + // Node status uint64 last_sequence = 4; // Last applied sequence number bool read_only = 5; // Whether the node is in read-only mode @@ -243,4 +243,4 @@ message ReplicaInfo { bool available = 3; // Whether the replica is available string region = 4; // Optional region information map meta = 5; // Additional metadata -} \ No newline at end of file +}