Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
67c111ef
Commit
67c111ef
authored
Jun 05, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
48110f65
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
38 deletions
+10
-38
go/neo/cluster_test.go
go/neo/cluster_test.go
+4
-4
go/neo/connection.go
go/neo/connection.go
+3
-32
go/neo/proto.go
go/neo/proto.go
+1
-1
go/neo/server.go
go/neo/server.go
+0
-1
go/neo/storage.go
go/neo/storage.go
+2
-0
No files found.
go/neo/cluster_test.go
View file @
67c111ef
...
...
@@ -48,19 +48,19 @@ func xfs1stor(path string) (*Storage, *fs1.FileStorage) {
// M drives cluster with 1 S through recovery -> verification -> service -> shutdown
func
TestMasterStorage
(
t
*
testing
.
T
)
{
net
:=
NetPipe
(
""
)
// test network XXX New registers to global table
S
,
_
:=
xfs1stor
(
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
net
:=
NetPipe
(
""
)
// test network FIXME New registers to global table
M
:=
NewMaster
(
"abc1"
)
S
,
_
:=
xfs1stor
(
"../zodb/storage/fs1/testdata/1.fs"
)
// XXX +readonly
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
Mctx
,
Mcancel
:=
context
.
WithCancel
(
context
.
Background
())
Sctx
,
Scancel
:=
context
.
WithCancel
(
context
.
Background
())
// XXX temp
Sbind
:=
""
;
Mbind
:=
""
;
var
err
error
_
=
Scancel
;
_
=
Mcancel
;
_
=
err
err
=
ListenAndServe
(
Sctx
,
net
,
Sbind
,
S
)
// XXX go
err
=
ListenAndServe
(
Mctx
,
net
,
Mbind
,
M
)
// XXX go
err
=
ListenAndServe
(
Sctx
,
net
,
Sbind
,
S
)
// XXX go
}
// basic interaction between Client -- Storage
...
...
go/neo/connection.go
View file @
67c111ef
...
...
@@ -690,38 +690,9 @@ func Dial(ctx context.Context, net Network, addr string) (nl *NodeLink, err erro
return
Handshake
(
ctx
,
peerConn
,
LinkClient
)
}
/* TODO not needed -> goes away
// Listener is like net.Listener but Accept returns net.Conn wrapped in NodeLink and handshaked XXX
type Listener struct {
net.Listener
}
func (l *Listener) Accept() (*NodeLink, error) {
peerConn, err := l.Listener.Accept()
if err != nil {
return nil, err
}
err = Handshake(peerConn) // FIXME blocking - not good - blocks further Accepts
if err != nil {
peerConn.Close()
return nil, err
}
return NewNodeLink(peerConn, LinkServer), nil
}
// TODO +tls.Config
// TODO +ctx -> no as .Close() will interrupt all .Accept()
func Listen(network, laddr string) (*Listener, error) {
l, err := net.Listen(network, laddr)
if err != nil {
return nil, err
}
return &Listener{l}, nil
}
*/
// NOTE there is no Listen with Handshake hooked into Accept because: Handshake
// is blocking operation and thus needs to be run in separate goroutine not to
// block further Accepts.
// ---- for convenience: String / Error ----
...
...
go/neo/proto.go
View file @
67c111ef
...
...
@@ -234,7 +234,7 @@ type NodeInfo struct {
Address
// serving address
NodeUUID
NodeState
IdTimestamp
float64
IdTimestamp
float64
// FIXME clarify semantic where it is used
}
// XXX -> parttab.go ?
...
...
go/neo/server.go
View file @
67c111ef
...
...
@@ -82,7 +82,6 @@ func ListenAndServe(ctx context.Context, net Network, laddr string, srv Server)
return
err
}
// TODO set keepalive on l
// TODO if TLS config -> tls.NewListener()
return
Serve
(
ctx
,
l
,
srv
)
}
...
...
go/neo/storage.go
View file @
67c111ef
...
...
@@ -36,6 +36,8 @@ import (
// Storage is NEO storage server application
type
Storage
struct
{
me
NodeInfo
// XXX -> only Address + NodeUUID ?
zstor
zodb
.
IStorage
// underlying ZODB storage XXX temp ?
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment