code
stringlengths
10
1.34M
language
stringclasses
1 value
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package xy import ( "circuit/kit/rh" "circuit/use/circuit" "circuit/use/e" ) func init() { circuit.R...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package xy import ( "circuit/kit/rh" "circuit/use/circuit" "circuit/use/e" "sync" ) // NoPanicYServe...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package xy import ( "circuit/kit/rh" "circuit/use/circuit" "circuit/use/e" ) // YServer type YServer ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rhunix import ( "strconv" "syscall" "time" ) func readSysStat(syscall_Stat_t interface{}) (ui...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package rhunix is an RH interface to the local UNIX file system. // // Formally, it is a ––>RH––>UNIX. ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rhunix import ( "strconv" "syscall" "time" ) func readSysStat(syscall_Stat_t interface{}) (ui...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rhunix import ( "fmt" "log" "os" "circuit/kit/rh" ) // RHFlag is an RH flag that has method...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rhunix import ( "fmt" "io" "log" "os" "path" "runtime" "strings" "sync" "time" "unsafe"...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rhunix import ( "encoding/gob" "fmt" "hash/fnv" "io" "log" "os" "syscall" "circuit/kit/r...
Go
// Copyright 2014 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2014 Chris Monson <chris@gocircuit.org> /* Shell-style argument parsing. This is not exactly like any of the shells in common use (e.g., Bash). T...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // File modified from original in code.google.com/p/goplan9 package rh import ( "encoding/gob" "fmt" ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package rh // Perm represents permissions and flags // // Permissions are kept in the low-order bits of t...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package stat import ( "time" ) // TimeSampler is a facility for collection stopwatch statistics over multiple exp...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package stat implements facilities for storing distribution sketches and updating them package stat import ( "m...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package stat // Histogram is a simple static histogram structure. // It consumes a stream of floating poi...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package stat import ( "time" ) // Sliding moment is a composite sketch. It keeps track of a sliding window of tim...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package sqlite provides access to the SQLite library, version 3. package sqlite /* #cgo LDFLAGS: -lsqlite3 #include <sqlite3.h> #include <stdlib.h> // The...
Go
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package sqlite3 provides access to the SQLite library, version 3. // // The package has no exported API. // It registers a driver for the standard Go databas...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package posix provides a few POSIX-based facilities for local and remote scripting package posix import ( "io/i...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package posix import ( "bytes" "circuit/kit/iomisc" "io" "os" "os/exec" "strings" ) func ForwardCo...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package os provides application-level utilities that are implemented using OS facilities (like lock files) packag...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package iomisc import ( "bufio" "bytes" "io" "sync" ) // PrefixReader returns a reader that reads fr...
Go
// Copyright 2013 Tumblr, Inc. // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package iomisc implements miscellaneous I/O facilities package iomisc import ( "io" "sync" ) // Combine retur...
Go
package iomisc import ( "bytes" "io" "sync" ) // Dup splits the reader src into two identical readers r1 and r2 that can be used out of sync. func Dup(u io.Reader) (r1, r2 io.Reader) { d := &dupReader{u: u} return d, (*dupReader2)(d) } type dupReader struct { sync.Mutex u io.Reader b1 bytes.Buffer b2 bytes...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package iomisc import ( "bytes" "io" "sync" "circuit/kit/rh" ) // // // type Prompt interface{} //...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package iomisc import ( "bytes" "fmt" "io" "log" "runtime" "sync" _ "circuit/kit/debug/ctrlc" "c...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package iomisc import ( "io" ) type multiWriter struct { writers []io.Writer } func (t *multiWriter) ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuse import ( "syscall" ) // An Error is a FUSE error. type Error interface { errno() int32 } ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuse import ( "bytes" "errors" "fmt" "io" "log" "os" "os/exec" "runtime" "sync" "syscal...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // FUSE service loop, for servers that wish to use it. package fuse import ( "runtime" ) func stack() string { buf := make([]byte, 1024) return string(bu...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Derived from FUSE's fuse_kernel.h /* This file defines the kernel interface of FUSE Copyright (C) 2001-2007 Miklos Szeredi <miklos@szeredi.hu> T...
Go
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fuse import ( "fmt" "net" "os" "os/exec" "syscall" ) func mount(dir string) (fusefd int, errmsg string) { fds, err := syscall.Socketpair(syscal...
Go
package fuse import ( "time" ) type attr struct { Ino uint64 Size uint64 Blocks uint64 Atime uint64 Mtime uint64 Ctime uint64 Crtime_ uint64 // OS X only AtimeNsec uint32 MtimeNsec uint32 CtimeNsec uint32 CrtimeNsec uint32 // OS X only Mode uint32 Nlink u...
Go
package fuse import "time" type attr struct { Ino uint64 Size uint64 Blocks uint64 Atime uint64 Mtime uint64 Ctime uint64 AtimeNsec uint32 MtimeNsec uint32 CtimeNsec uint32 Mode uint32 Nlink uint32 Uid uint32 Gid uint32 Rdev uint32 // Blksize uint32...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fuse // BUG(rsc): The mount code for FreeBSD has not been written yet. import ( "bytes" "fmt" "os" "syscall" "time" "unsafe" ) const ( Kernel...
Go
package fuse
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fuse // // #include <stdlib.h> // #include <sys/param.h> // #include <sys/mount.h> // import "C" import ( "unsafe" ) type vfsconf struct { Name ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" "circuit/kit/rh/rhunix" ) func (r *RH) op...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "path" "circuit/kit/fuse" "circuit/kit/rh" "circuit/kit/rh/rhunix" ) func (...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" ) func (r *RH) getattr(nodeFID rh.FID) int...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" ) func (r *RH) access(req *fuse.AccessRequ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package fuserh provides a FUSE server for an RH file system. // // In our modular notation for file sys...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" "circuit/kit/rh/rhunix" "log" ) func (r ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh var JunkFiles = []string{}
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh var JunkFiles = []string{"._", "Backups.backupdb", "mach_kernel", ".hidden"}
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" ) func (r *RH) release(req *fuse.ReleaseRe...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "sync" "circuit/kit/fuse" "circuit/kit/rh" ) // HandleTable type HandleTable...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package main import ( "fmt" "os" _ "circuit/kit/debug/ctrlc" // Ctrl-C panics the process "circuit/k...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "sync" "circuit/kit/fuse" ) // An Intr is a channel that signals that a reque...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "log" "circuit/kit/fuse" "circuit/kit/rh" ) func (r *RH) setattr(req *fuse.S...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "sync" "circuit/kit/fuse" "circuit/kit/rh" ) // NodeTable type NodeTable str...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "io" "circuit/kit/fuse" ) func (r *RH) init() interface{} { return &fuse.Ini...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "fmt" "io" "log" "path" "strings" "sync" "circuit/kit/fuse" "circuit/kit...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "circuit/kit/fuse" "circuit/kit/rh" ) func (r *RH) lookup(req *fuse.LookupRequ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package fuserh import ( "os" "strconv" "time" "circuit/kit/fuse" "circuit/kit/rh" "circuit/kit/rh/...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Adapted from Plan 9 from User Space's src/cmd/9pfuse/fuse.c, // which carries this notice: // // The files in this directory are subject to the following li...
Go
// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package fuse import ( "fmt" "os" "os/exec" "strconv" "syscall" ) func mount(dir string) (fd int, serr string) { // Load OSXFUSE var err error if _, e...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package lang import ( "fmt" "hash/fnv" "io" "math/rand" "reflect" "strconv" ) // ReceiverID is a u...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package sandbox import ( "io" "net" "sync" "circuit/kit/tele/trace" ) // listener implements a net....
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package sandbox import ( "bytes" "io" "log" "net" "sync" "time" "circuit/kit/tele/trace" ) // Co...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package sandbox provides a simulated carrier Transport for testing purposes. package sandbox import ( ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package sandbox provides a simulated carrier Transport for testing purposes. package sandbox import ( ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package sandbox import ( "net" "sync" "time" "circuit/kit/tele/trace" ) // writeCloseRace is the bu...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package load is utilized for its side-effect of installing the circuit's Teleport Transport networking ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package faithful provides a lossless chunked connection over a lossy one. package faithful import ( "...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package faithful import ( "net" "circuit/kit/tele/chain" "circuit/kit/tele/trace" ) // Transport typ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package faithful import ( "bytes" "encoding/binary" "fmt" "io/ioutil" "circuit/kit/tele/chain" ) /...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package faithful provides a lossless chunked connection over a lossy one. package faithful import ( "...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package faithful import ( "io" ) // BufferRead holds the return values of a call to Buffer.Read type Bu...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package faithful import ( "bytes" "container/list" "fmt" "io" "sync" "circuit/kit/tele/trace" ) /...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package faithful provides a lossless chunked connection over a lossy one. package faithful import ( "...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package tele import ( "circuit/kit/tele/blend" "circuit/kit/tele/chain" "circuit/kit/tele/codec" "cir...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package codec import ( "net" "circuit/kit/tele/faithful" ) type Conn struct { enc Encoder dec D...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package codec import ( "net" "circuit/kit/tele/faithful" ) type Transport struct { sub *faithful.T...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package codec // Codec type Codec interface { NewEncoder() Encoder NewDecoder() Decoder } // Encoder t...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package codec import ( "bytes" "encoding/gob" ) // GobCodec type GobCodec struct{} func (GobCodec) Ne...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "io" "net" "sync" "time" "circuit/kit/tele/codec" "circuit/kit/tele/trace" ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "net" "circuit/kit/tele/codec" "circuit/kit/tele/trace" ) type Listener struc...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "io" "net" "sync" ) /* accept/dial Conn +-----------+ +-...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "net" "circuit/kit/tele/codec" "circuit/kit/tele/trace" ) type Transport stru...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "net" "circuit/kit/tele/codec" "circuit/kit/tele/trace" ) type Dialer struct ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "errors" ) var ( ErrClash = errors.New("clash") ErrGone = errors.New("gone") ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package blend import ( "encoding/gob" ) type ( ConnID uint32 SeqNo uint32 ) type PayloadMsg struct ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package trace import ( "fmt" ) type Op int const ( READ = Op(iota) WRITE ) func PrintOp(err error, ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package trace import ( "fmt" "sync" ) var ( tlk sync.Mutex tkt uint32 ) func TakeTicket() string { ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> // Package trace implements an ad-hoc tracing system package trace import ( "bytes" "fmt" "log" "os" ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bufio" "net" "sync" "circuit/kit/tele/limiter" "circuit/kit/tele/trace" ) ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bufio" "io" "net" "sync" "circuit/kit/tele/trace" ) /* Kill (turns Accept...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bufio" "io" "net" "sync" "circuit/kit/tele/trace" ) // Conn is a chunk con...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "net" "time" "circuit/kit/tele/trace" ) type Transport struct { frame trac...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bytes" "fmt" "net" gosync "sync" cirsync "circuit/kit/sync" ) type Stat st...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bufio" "errors" "fmt" "io" "log" "math/rand" "net" "sync" "time" "circ...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "sync" "circuit/kit/tele/trace" ) type Cascade struct { frame trace.Frame rw...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "errors" "fmt" ) var ( // ErrMisbehave indicates that the remote endpoint is n...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "bytes" "encoding/binary" "fmt" "io" "io/ioutil" "math/rand" ) // chainID i...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package chain import ( "errors" "net" ) // Carrier represents a transport underlying the chain transpo...
Go
// tele-review is a debugging tool for internal use only. package main import ( "bufio" "fmt" "io" "os" "strings" "time" ) func main() { } const ( logTimeLayout = "2006/01/02 15:04:05" ) var ( addrToFrame map[string]string ) type frame struct { Time time.Time Addr string Frame string } func parse(r i...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package main import ( "flag" "math/rand" "time" //_ "circuit/kit/debug/ctrlc" ) func init() { rand...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package main import ( "fmt" "net" "os" "circuit/kit/tele" "circuit/kit/tele/blend" "circuit/kit/te...
Go
// Copyright 2013 The Go Circuit Project // Use of this source code is governed by the license for // The Go Circuit Project, found in the LICENSE file. // // Authors: // 2013 Petar Maymounkov <p@gocircuit.org> package main import ( "encoding/gob" ) func init() { gob.Register(&cargo{}) } type cargo struct { Ca...
Go