repo stringlengths 6 47 | file_url stringlengths 77 269 | file_path stringlengths 5 186 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-07 08:35:43 2026-01-07 08:55:24 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/raw_reader_test.go | test/raw_reader_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/simple_writer_test.go | test/simple_writer_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/service_test.go | test/service_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/reader_test.go | test/reader_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/client_test.go | test/client_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/test/simple_reader_test.go | test/simple_reader_test.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/unixhelloserver.go | examples/unixhelloserver.go | package main
import "github.com/hprose/hprose-go"
func hello(name string) string {
return "Hello " + name + "!"
}
func main() {
server := hprose.NewUnixServer("unix:/tmp/my.sock")
server.AddFunction("hello", hello)
server.Start()
}
| go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/wshelloclient.go | examples/wshelloclient.go | package main
import (
"fmt"
"reflect"
"github.com/hprose/hprose-go"
)
type A struct {
S string `json:"str"`
}
type Stub struct {
Hello func(string) string
GetEmptySlice func() interface{}
}
func main() {
hprose.ClassManager.Register(reflect.TypeOf(A{}), "A", "json")
client := hprose.NewClient("ws:/... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcpsessionserver.go | examples/tcpsessionserver.go | package main
import "github.com/hprose/hprose-go"
var Session []map[string]interface{}
func GetSession(context hprose.Context) map[string]interface{} {
sessionid, _ := context.GetInt("sessionid")
return Session[sessionid]
}
type MyServerFilter struct{}
func (MyServerFilter) InputFilter(data []byte, context hpros... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/httphelloclient.go | examples/httphelloclient.go | package main
import (
"fmt"
"reflect"
"github.com/hprose/hprose-go"
)
type A struct {
S string `json:"str"`
}
type Stub struct {
Hello func(string) string
GetEmptySlice func() interface{}
}
func main() {
hprose.ClassManager.Register(reflect.TypeOf(A{}), "A", "json")
client := hprose.NewClient("http... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcphelloclient.go | examples/tcphelloclient.go | package main
import (
"fmt"
"github.com/hprose/hprose-go"
)
type Stub struct {
Hello func(string) (string, error)
}
func main() {
client := hprose.NewClient("tcp4://127.0.0.1:4321/")
var stub *Stub
client.UseService(&stub)
fmt.Println(stub.Hello("world"))
}
| go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcpfileserver.go | examples/tcpfileserver.go | package main
import (
"io/ioutil"
"github.com/hprose/hprose-go"
)
func main() {
server := hprose.NewTcpServer("tcp4://0.0.0.0:4321/")
server.AddFunction("writeFile", ioutil.WriteFile)
server.Start()
}
| go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/unixhelloclient.go | examples/unixhelloclient.go | package main
import (
"fmt"
"github.com/hprose/hprose-go"
)
type Stub struct {
Hello func(string) (string, error)
}
func main() {
client := hprose.NewClient("unix:/tmp/my.sock")
var stub *Stub
client.UseService(&stub)
fmt.Println(stub.Hello("world"))
}
| go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/httpjsonserver.go | examples/httpjsonserver.go | package main
import (
"net/http"
"reflect"
"github.com/hprose/hprose-go"
)
func hello(name string, context *hprose.HttpContext) string {
return "Hello " + name + "! - " + context.Request.RemoteAddr
}
type User struct {
Name string `json:"n"`
Age int `json:"a"`
HaHa string `json:"-"`
}
func getUser(nam... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/httphelloserver.go | examples/httphelloserver.go | package main
import (
"fmt"
"net/http"
"reflect"
"github.com/hprose/hprose-go"
)
func hello(name string, context *hprose.HttpContext) string {
return "Hello " + name + "! - " + context.Request.RemoteAddr
}
type A struct {
S string `json:"str"`
}
func getEmptySlice() interface{} {
s := make([]A, 100)
retu... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/wshelloserver.go | examples/wshelloserver.go | package main
import (
"fmt"
"net/http"
"reflect"
"github.com/hprose/hprose-go"
)
func hello(name string, context *hprose.HttpContext) string {
return "Hello " + name + "! - " + context.Request.RemoteAddr
}
type A struct {
S string `json:"str"`
}
func getEmptySlice() interface{} {
s := make([]A, 100)
retu... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/httpjsonclient.go | examples/httpjsonclient.go | package main
import (
"fmt"
"reflect"
"github.com/hprose/hprose-go"
)
type User struct {
Name string `json:"n"`
Age int `json:"a"`
HaHa string `json:"-"`
}
type Stub struct {
Hello func(string) string
GetUser func(name string, age int) *User
}
func main() {
hprose.ClassManager.Register(reflect.TypeO... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcphelloserver.go | examples/tcphelloserver.go | package main
import "github.com/hprose/hprose-go"
func hello(name string) string {
return "Hello " + name + "!"
}
func main() {
server := hprose.NewTcpServer("tcp4://0.0.0.0:4321/")
server.AddFunction("hello", hello)
server.Start()
}
| go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcpfileclient.go | examples/tcpfileclient.go | package main
import (
"fmt"
"io/ioutil"
"os"
"github.com/hprose/hprose-go"
)
type Stub struct {
WriteFile func(filename string, data []byte, perm os.FileMode) error
}
func main() {
client := hprose.NewClient("tcp4://127.0.0.1:4321/")
var stub *Stub
client.UseService(&stub)
data, err := ioutil.ReadFile("hel... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/examples/tcpsessionclient.go | examples/tcpsessionclient.go | package main
import (
"fmt"
"github.com/hprose/hprose-go"
)
type Stub struct {
Inc func() int
}
type MyClientFilter struct {
SessionID int
}
func (filter *MyClientFilter) InputFilter(data []byte, context hprose.Context) []byte {
if len(data) > 7 && data[0] == 's' && data[1] == 'i' && data[2] == 'd' {
filter... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/uuid.go | io/uuid.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/writer.go | io/writer.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/reader.go | io/reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/tags.go | io/tags.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/formatter.go | io/formatter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/class_manager.go | io/class_manager.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/io/raw_reader.go | io/raw_reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/uuid.go | hprose/uuid.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/http_client.go | hprose/http_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/tcp_service.go | hprose/tcp_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/client.go | hprose/client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/service.go | hprose/service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/filter.go | hprose/filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/result_mode.go | hprose/result_mode.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/websocket_client.go | hprose/websocket_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/writer.go | hprose/writer.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/reader.go | hprose/reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | true |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/tags.go | hprose/tags.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/websocket_service.go | hprose/websocket_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/jsonrpc_service_filter.go | hprose/jsonrpc_service_filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/formatter.go | hprose/formatter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/unix_service.go | hprose/unix_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/class_manager.go | hprose/class_manager.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/unix_client.go | hprose/unix_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/1_1_compatible.go | hprose/1_1_compatible.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/tcp_client.go | hprose/tcp_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/jsonrpc_client_filter.go | hprose/jsonrpc_client_filter.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/stream_service.go | hprose/stream_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/context.go | hprose/context.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/stream_client.go | hprose/stream_client.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/raw_reader.go | hprose/raw_reader.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/http_service.go | hprose/http_service.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
hprose/hprose-go | https://github.com/hprose/hprose-go/blob/83de97da5004027694d321ca38c80fca3fac98c2/hprose/stream_common.go | hprose/stream_common.go | /**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| ... | go | MIT | 83de97da5004027694d321ca38c80fca3fac98c2 | 2026-01-07T09:45:58.696761Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/init.go | init.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/deploy.go | deploy.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/build.go | build.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/build_notlinux.go | build_notlinux.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/build_linux.go | build_linux.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/main.go | main.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
rakyll/golambda | https://github.com/rakyll/golambda/blob/fe7f93404f61d15f822a6898ae173a5c6bd5c837/examples/helloworld/main.go | examples/helloworld/main.go | // Copyright 2020 Jaana Dogan. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... | go | Apache-2.0 | fe7f93404f61d15f822a6898ae173a5c6bd5c837 | 2026-01-07T09:45:58.965936Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/server.go | server.go | package httpq
import (
"encoding/json"
"log"
"net/http"
)
type Server struct {
httpq *Httpq
}
func NewServer(httpq *Httpq) *Server {
return &Server{httpq}
}
func (s *Server) Push(w http.ResponseWriter, r *http.Request) {
if err := s.httpq.PushRequest(r); err != nil {
log.Printf("Error: %v", err)
w.WriteHe... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/httpq.go | httpq.go | package httpq
import (
"bufio"
"bytes"
"fmt"
"net/http"
"net/http/httputil"
)
type Httpq struct {
q Queue
debug bool
}
func NewHttpq(q Queue, debug bool) *Httpq {
return &Httpq{q, debug}
}
func (h *Httpq) PushRequest(r *http.Request) error {
requestBytes, err := httputil.DumpRequest(r, true)
if err !=... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/queue.go | queue.go | package httpq
type Queue interface {
Push([]byte) error
Pop() ([]byte, error)
Size() (uint64, error)
}
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/cmd/httpq/redis.go | cmd/httpq/redis.go | package main
import "github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/garyburd/redigo/redis"
type redisConnManager struct {
url string
}
func NewRedisConnManager(url string) *redisConnManager {
return &redisConnManager{url}
}
func (r *redisConnManager) newRedisConn() (redis.Conn, error) {
c, err := re... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/cmd/httpq/main.go | cmd/httpq/main.go | package main
import (
"flag"
"log"
"net/http"
"github.com/DavidHuie/httpq"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/garyburd/redigo/redis"
"github.com/DavidHuie/httpq/queue/boltqueue"
"github.com/DavidHuie/httpq/queu... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/queue/redisqueue/redisqueue.go | queue/redisqueue/redisqueue.go | package redisqueue
import "github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/garyburd/redigo/redis"
const (
redisListName = "httpq"
)
type RedisQueue struct {
pool *redis.Pool
}
func NewRedisQueue(pool *redis.Pool) *RedisQueue {
return &RedisQueue{pool}
}
func (r *RedisQueue) Push(bytes []byte) error ... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/queue/boltqueue/boltqueue.go | queue/boltqueue/boltqueue.go | package boltqueue
import (
"encoding/binary"
"encoding/json"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
type BoltQueue struct {
conn *bolt.DB
}
func NewBoltQueue(conn *bolt.DB) *BoltQueue {
return &BoltQueue{conn}
}
type queueMetadata struct {
Head uint64
Last uint64
}
func... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_arm.go | package bolt
// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0x7FFFFFFF // 2GB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0xFFFFFFF
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/tx_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/tx_test.go | package bolt_test
import (
"errors"
"fmt"
"os"
"testing"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Ensure that committing a closed transaction returns an error.
func TestTx_Commit_Closed(t *testing.T) {
db := NewTestDB()
defer db.Close()
tx, _ := db.Begin(true)
tx.Create... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_test.go | package bolt_test
import (
"fmt"
"path/filepath"
"reflect"
"runtime"
"testing"
)
// assert fails the test if the condition is false.
func assert(tb testing.TB, condition bool, msg string, v ...interface{}) {
if !condition {
_, file, line, _ := runtime.Caller(1)
fmt.Printf("\033[31m%s:%d: "+msg+"\033[39m\n\n... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/tx.go | Godeps/_workspace/src/github.com/boltdb/bolt/tx.go | package bolt
import (
"fmt"
"io"
"os"
"sort"
"time"
"unsafe"
)
// txid represents the internal transaction identifier.
type txid uint64
// Tx represents a read-only or read/write transaction on the database.
// Read-only transactions can be used for retrieving values for keys and creating cursors.
// Read/writ... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/node.go | Godeps/_workspace/src/github.com/boltdb/bolt/node.go | package bolt
import (
"bytes"
"fmt"
"sort"
"unsafe"
)
// node represents an in-memory, deserialized page.
type node struct {
bucket *Bucket
isLeaf bool
unbalanced bool
spilled bool
key []byte
pgid pgid
parent *node
children nodes
inodes inodes
}
// root returns the top-... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/quick_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/quick_test.go | package bolt_test
import (
"bytes"
"flag"
"fmt"
"math/rand"
"os"
"reflect"
"testing/quick"
"time"
)
// testing/quick defaults to 5 iterations and a random seed.
// You can override these settings from the command line:
//
// -quick.count The number of iterations to perform.
// -quick.seed The see... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/errors.go | Godeps/_workspace/src/github.com/boltdb/bolt/errors.go | package bolt
import "errors"
// These errors can be returned when opening or calling methods on a DB.
var (
// ErrDatabaseNotOpen is returned when a DB instance is accessed before it
// is opened or after it is closed.
ErrDatabaseNotOpen = errors.New("database not open")
// ErrDatabaseOpen is returned when openi... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go | Godeps/_workspace/src/github.com/boltdb/bolt/bucket.go | package bolt
import (
"bytes"
"fmt"
"unsafe"
)
const (
// MaxKeySize is the maximum length of a key, in bytes.
MaxKeySize = 32768
// MaxValueSize is the maximum length of a value, in bytes.
MaxValueSize = 4294967295
)
const (
maxUint = ^uint(0)
minUint = 0
maxInt = int(^uint(0) >> 1)
minInt = -maxInt -... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/node_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/node_test.go | package bolt
import (
"testing"
"unsafe"
)
// Ensure that a node can insert a key/value.
func TestNode_put(t *testing.T) {
n := &node{inodes: make(inodes, 0), bucket: &Bucket{tx: &Tx{meta: &meta{pgid: 1}}}}
n.put([]byte("baz"), []byte("baz"), []byte("2"), 0, 0)
n.put([]byte("foo"), []byte("foo"), []byte("0"), 0,... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_unix.go | // +build !windows,!plan9
package bolt
import (
"fmt"
"os"
"syscall"
"time"
"unsafe"
)
// flock acquires an advisory lock on a file descriptor.
func flock(f *os.File, timeout time.Duration) error {
var t time.Time
for {
// If we're beyond our timeout then return an error.
// This can only occur after we'v... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/freelist.go | Godeps/_workspace/src/github.com/boltdb/bolt/freelist.go | package bolt
import (
"fmt"
"sort"
"unsafe"
)
// freelist represents a list of all pages that are available for allocation.
// It also tracks pages that have been freed but are still in use by open transactions.
type freelist struct {
ids []pgid // all free and available free page ids.
pending map[t... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/page.go | Godeps/_workspace/src/github.com/boltdb/bolt/page.go | package bolt
import (
"fmt"
"os"
"unsafe"
)
const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr))
const minKeysPerPage = 2
const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{}))
const leafPageElementSize = int(unsafe.Sizeof(leafPageElement{}))
const (
branchPageFlag = 0x01
leafPageF... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cursor_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/cursor_test.go | package bolt_test
import (
"bytes"
"encoding/binary"
"fmt"
"os"
"sort"
"testing"
"testing/quick"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Ensure that a cursor can return a reference to the bucket that created it.
func TestCursor_Bucket(t *testing.T) {
db := NewTestDB()
... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/db_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/db_test.go | package bolt_test
import (
"encoding/binary"
"errors"
"flag"
"fmt"
"io/ioutil"
"os"
"regexp"
"runtime"
"sort"
"strings"
"testing"
"time"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
var statsFlag = flag.Bool("stats", false, "show performance stats")
// Ensure that opening... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_openbsd.go | package bolt
import (
"syscall"
"unsafe"
)
const (
msAsync = 1 << iota // perform asynchronous writes
msSync // perform synchronous writes
msInvalidate // invalidate cached data
)
var odirect int
func msync(db *DB) error {
_, _, errno := syscall.Syscall(syscall.SYS_MSYNC, ui... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bucket_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/bucket_test.go | package bolt_test
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"math/rand"
"os"
"strconv"
"strings"
"testing"
"testing/quick"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Ensure that a bucket that gets a non-existent key returns nil.
func TestBucket_Get_NonExistent(t... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go | Godeps/_workspace/src/github.com/boltdb/bolt/cursor.go | package bolt
import (
"bytes"
"fmt"
"sort"
)
// Cursor represents an iterator that can traverse over all key/value pairs in a bucket in sorted order.
// Cursors see nested buckets with value == nil.
// Cursors can be obtained from a transaction and are valid as long as the transaction is open.
//
// Changing data ... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_linux.go | package bolt
import (
"syscall"
)
var odirect = syscall.O_DIRECT
// fdatasync flushes written data to a file descriptor.
func fdatasync(db *DB) error {
return syscall.Fdatasync(int(db.file.Fd()))
}
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_amd64.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_amd64.go | package bolt
// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0xFFFFFFFFFFFF // 256TB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0x7FFFFFFF
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/page_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/page_test.go | package bolt
import (
"testing"
)
// Ensure that the page type can be returned in human readable format.
func TestPage_typ(t *testing.T) {
if typ := (&page{flags: branchPageFlag}).typ(); typ != "branch" {
t.Fatalf("exp=branch; got=%v", typ)
}
if typ := (&page{flags: leafPageFlag}).typ(); typ != "leaf" {
t.Fat... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/simulation_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/simulation_test.go | package bolt_test
import (
"bytes"
"fmt"
"math/rand"
"sync"
"testing"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
func TestSimulate_1op_1p(t *testing.T) { testSimulate(t, 100, 1) }
func TestSimulate_10op_1p(t *testing.T) { testSimulate(t, 10, 1) }
func TestSimulate_100op_... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go | Godeps/_workspace/src/github.com/boltdb/bolt/boltsync_unix.go | // +build !windows,!plan9,!linux,!openbsd
package bolt
var odirect int
// fdatasync flushes written data to a file descriptor.
func fdatasync(db *DB) error {
return db.file.Sync()
}
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/freelist_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/freelist_test.go | package bolt
import (
"reflect"
"testing"
"unsafe"
)
// Ensure that a page is added to a transaction's freelist.
func TestFreelist_free(t *testing.T) {
f := newFreelist()
f.free(100, &page{id: 12})
if !reflect.DeepEqual([]pgid{12}, f.pending[100]) {
t.Fatalf("exp=%v; got=%v", []pgid{12}, f.pending[100])
}
}
... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/db.go | Godeps/_workspace/src/github.com/boltdb/bolt/db.go | package bolt
import (
"fmt"
"hash/fnv"
"os"
"runtime"
"runtime/debug"
"strings"
"sync"
"time"
"unsafe"
)
// The largest step that can be taken when remapping the mmap.
const maxMmapStep = 1 << 30 // 1GB
// The data file format version.
const version = 2
// Represents a marker value to indicate that a file ... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_windows.go | package bolt
import (
"fmt"
"os"
"syscall"
"time"
"unsafe"
)
var odirect int
// fdatasync flushes written data to a file descriptor.
func fdatasync(db *DB) error {
return db.file.Sync()
}
// flock acquires an advisory lock on a file descriptor.
func flock(f *os.File, _ time.Duration) error {
return nil
}
//... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/doc.go | Godeps/_workspace/src/github.com/boltdb/bolt/doc.go | /*
Package bolt implements a low-level key/value store in pure Go. It supports
fully serializable transactions, ACID semantics, and lock-free MVCC with
multiple readers and a single writer. Bolt can be used for projects that
want a simple data store without the need to add large dependencies such as
Postgres or MySQL.
... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/bolt_386.go | Godeps/_workspace/src/github.com/boltdb/bolt/bolt_386.go | package bolt
// maxMapSize represents the largest mmap size supported by Bolt.
const maxMapSize = 0x7FFFFFFF // 2GB
// maxAllocSize is the size used when creating array pointers.
const maxAllocSize = 0xFFFFFFF
| go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/pages.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/pages.go | package main
import (
"os"
"strconv"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Pages prints a list of all pages in a database.
func Pages(path string) {
if _, err := os.Stat(path); os.IsNotExist(err) {
fatal(err)
return
}
db, err := bolt.Open(path, 0600, nil)
if err !... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/keys_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/keys_test.go | package main_test
import (
"testing"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
. "github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt"
)
// Ensure that a list of keys can be retrieved for a given bucket.
func TestKeys(t *testing.T) {
SetTestMode(true)
... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/stats.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/stats.go | package main
import (
"bytes"
"os"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Collect stats for all top level buckets matching the prefix.
func Stats(path, prefix string) {
if _, err := os.Stat(path); os.IsNotExist(err) {
fatal(err)
return
}
db, err := bolt.Open(path, 0... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/buckets.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/buckets.go | package main
import (
"os"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Buckets prints a list of all buckets.
func Buckets(path string) {
if _, err := os.Stat(path); os.IsNotExist(err) {
fatal(err)
return
}
db, err := bolt.Open(path, 0600, nil)
if err != nil {
fatal(err... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/stats_test.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/stats_test.go | package main_test
import (
"os"
"strconv"
"testing"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
. "github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt"
)
func TestStats(t *testing.T) {
if os.Getpagesize() != 4096 {
t.Skip()
}
SetTestMode(true)
ope... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
DavidHuie/httpq | https://github.com/DavidHuie/httpq/blob/b61e704546bfd3cabc2a244f8be9b99d40a17d43/Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/check.go | Godeps/_workspace/src/github.com/boltdb/bolt/cmd/bolt/check.go | package main
import (
"os"
"github.com/DavidHuie/httpq/Godeps/_workspace/src/github.com/boltdb/bolt"
)
// Check performs a consistency check on the database and prints any errors found.
func Check(path string) {
if _, err := os.Stat(path); os.IsNotExist(err) {
fatal(err)
return
}
db, err := bolt.Open(path,... | go | MIT | b61e704546bfd3cabc2a244f8be9b99d40a17d43 | 2026-01-07T09:45:59.175747Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.