Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directions ¶
type Directions struct { // Path determines the source code path to walk along. It's required Path string // Name is the name of the RPC declaration (e.g. `type MathService struct{}`). Name string // Service is the name of the RPC service. (e.g. `Math` in `Math.Sum`) Service string }
Directions tell the Walker where to walk and what to pay attention to along the way.
type Visitor ¶
type Visitor struct {
// contains filtered or unexported fields
}
Visitor traverses a Go package's AST, visits declarations that satisfy the structure of an RPC service, and extracts their RPC methods.
type VisitorConfig ¶
type VisitorConfig struct { // Pkg contains metadata for the target package. Pkg *loader.PackageInfo // Provider determines which RPC methods are suitable. Provider provider.Provider // Declaration is the name of the target RPC declaration (method receiver). Declaration string }
VisitorConfig is used to create a Visitor.
type Walker ¶
type Walker struct { // Provider answers RPC-implementation-specific (e.g. stl, gorilla, etc.) questions. Provider provider.Provider Writer writer.Writer }
A Walker walks along supplied directions, visits server RPC code, and generates RPC client code along the way with the help of others.
func (*Walker) Walk ¶
func (w *Walker) Walk(directions Directions) error
Walk is the logical entrypoint for Glue. It walks the source code and asks
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
example
|
|
stl/math/math
Package math is here to test that Glue can handle import name collisions.
|
Package math is here to test that Glue can handle import name collisions. |
internal
|
|
gen
Package set is a template Set type
|
Package set is a template Set type |
Click to show internal directories.
Click to hide internal directories.