Documentation ¶
Index ¶
- func Register(server *rpc.Server, thing interface{}) (name string, err error)
- type App
- func (c *App) Build(ctx *app.Context) error
- func (c *App) Close() error
- func (c *App) Compile(ctx *app.Context) (*app.CompileResult, error)
- func (c *App) Deploy(ctx *app.Context) error
- func (c *App) Dev(ctx *app.Context) error
- func (c *App) DevDep(dst, src *app.Context) (*app.DevDep, error)
- func (c *App) Implicit(ctx *app.Context) (*appfile.File, error)
- func (c *App) Meta() (*app.Meta, error)
- type AppCompileResponse
- type AppContextArgs
- type AppDevDepArgs
- type AppDevDepResponse
- type AppFunc
- type AppImplicitResponse
- type AppMetaResponse
- type AppServer
- func (s *AppServer) Build(args *AppContextArgs, reply *AppSimpleResponse) error
- func (s *AppServer) Compile(args *AppContextArgs, reply *AppCompileResponse) error
- func (s *AppServer) Deploy(args *AppContextArgs, reply *AppSimpleResponse) error
- func (s *AppServer) Dev(args *AppContextArgs, reply *AppSimpleResponse) error
- func (s *AppServer) DevDep(args *AppDevDepArgs, reply *AppDevDepResponse) error
- func (s *AppServer) Implicit(args *AppContextArgs, reply *AppImplicitResponse) error
- func (s *AppServer) Meta(args *struct{}, reply *AppMetaResponse) error
- type AppSimpleResponse
- type BasicError
- type Client
- type ContextSharedArgs
- type DirGetBlobArgs
- type DirGetBlobResponse
- type DirGetBuildResponse
- type DirGetDeployResponse
- type DirGetDevResponse
- type DirGetInfraResponse
- type DirPutBlobArgs
- type DirPutBuildResponse
- type DirPutDeployResponse
- type DirPutDevResponse
- type DirPutInfraResponse
- type Directory
- func (d *Directory) DeleteDev(v *directory.Dev) error
- func (d *Directory) GetBlob(key string) (*directory.BlobData, error)
- func (d *Directory) GetBuild(v *directory.Build) (*directory.Build, error)
- func (d *Directory) GetDeploy(v *directory.Deploy) (*directory.Deploy, error)
- func (d *Directory) GetDev(v *directory.Dev) (*directory.Dev, error)
- func (d *Directory) GetInfra(v *directory.Infra) (*directory.Infra, error)
- func (d *Directory) PutBlob(key string, data *directory.BlobData) error
- func (d *Directory) PutBuild(v *directory.Build) error
- func (d *Directory) PutDeploy(v *directory.Deploy) error
- func (d *Directory) PutDev(v *directory.Dev) error
- func (d *Directory) PutInfra(v *directory.Infra) error
- type DirectoryServer
- func (s *DirectoryServer) DeleteDev(args *directory.Dev, reply *ErrorResponse) error
- func (s *DirectoryServer) GetBlob(args *DirGetBlobArgs, reply *DirGetBlobResponse) error
- func (s *DirectoryServer) GetBuild(args *directory.Build, reply *DirGetBuildResponse) error
- func (s *DirectoryServer) GetDeploy(args *directory.Deploy, reply *DirGetDeployResponse) error
- func (s *DirectoryServer) GetDev(args *directory.Dev, reply *DirGetDevResponse) error
- func (s *DirectoryServer) GetInfra(args *directory.Infra, reply *DirGetInfraResponse) error
- func (s *DirectoryServer) PutBlob(args *DirPutBlobArgs, reply *ErrorResponse) error
- func (s *DirectoryServer) PutBuild(args *directory.Build, reply *DirPutBuildResponse) error
- func (s *DirectoryServer) PutDeploy(args *directory.Deploy, reply *DirPutDeployResponse) error
- func (s *DirectoryServer) PutDev(args *directory.Dev, reply *DirPutDevResponse) error
- func (s *DirectoryServer) PutInfra(args *directory.Infra, reply *DirPutInfraResponse) error
- type ErrorResponse
- type Server
- type Ui
- type UiInputResponse
- type UiServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppCompileResponse ¶
type AppCompileResponse struct { Result *app.CompileResult Error *BasicError }
type AppContextArgs ¶
type AppDevDepResponse ¶
type AppDevDepResponse struct { Result *app.DevDep Error *BasicError }
type AppImplicitResponse ¶
type AppImplicitResponse struct { Result *appfile.File Error *BasicError }
type AppMetaResponse ¶
type AppMetaResponse struct { Result *app.Meta Error *BasicError }
type AppServer ¶
AppServer is a net/rpc compatible structure for serving an App. This should not be used directly.
func (*AppServer) Build ¶
func (s *AppServer) Build( args *AppContextArgs, reply *AppSimpleResponse) error
func (*AppServer) Compile ¶
func (s *AppServer) Compile( args *AppContextArgs, reply *AppCompileResponse) error
func (*AppServer) Deploy ¶
func (s *AppServer) Deploy( args *AppContextArgs, reply *AppSimpleResponse) error
func (*AppServer) Dev ¶
func (s *AppServer) Dev( args *AppContextArgs, reply *AppSimpleResponse) error
func (*AppServer) DevDep ¶
func (s *AppServer) DevDep( args *AppDevDepArgs, reply *AppDevDepResponse) error
func (*AppServer) Implicit ¶
func (s *AppServer) Implicit( args *AppContextArgs, reply *AppImplicitResponse) error
func (*AppServer) Meta ¶
func (s *AppServer) Meta( args *struct{}, reply *AppMetaResponse) error
type AppSimpleResponse ¶
type AppSimpleResponse struct {
Error *BasicError
}
type BasicError ¶
type BasicError struct {
Message string
}
This is a type that wraps error types so that they can be messaged across RPC channels. Since "error" is an interface, we can't always gob-encode the underlying structure. This is a valid error interface implementer that we will push across.
func NewBasicError ¶
func NewBasicError(err error) *BasicError
func (*BasicError) Error ¶
func (e *BasicError) Error() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects to a Server in order to request plugin implementations for Otto.
func NewClient ¶
func NewClient(conn io.ReadWriteCloser) (*Client, error)
NewClient creates a client from an already-open connection-like value. Dial is typically used instead.
func (*Client) Close ¶
Close closes the connection. The client is no longer usable after this is called.
func (*Client) SyncStreams ¶
SyncStreams should be called to enable syncing of stdout, stderr with the plugin.
This will return immediately and the syncing will continue to happen in the background. You do not need to launch this in a goroutine itself.
This should never be called multiple times.
type ContextSharedArgs ¶
type ContextSharedArgs struct {}
ContextSharedArgs is a struct that should be embedded directly into args structs that contain a context. It will be populated with the IDs that can be used to communicate back to the interfaces.
type DirGetBlobArgs ¶
type DirGetBlobResponse ¶
type DirGetBlobResponse struct { Ok bool Error *BasicError }
type DirGetBuildResponse ¶
type DirGetBuildResponse struct { Value *directory.Build Error *BasicError }
type DirGetDeployResponse ¶
type DirGetDeployResponse struct { Value *directory.Deploy Error *BasicError }
type DirGetDevResponse ¶
type DirGetDevResponse struct { Value *directory.Dev Error *BasicError }
type DirGetInfraResponse ¶
type DirGetInfraResponse struct { Value *directory.Infra Error *BasicError }
type DirPutBlobArgs ¶
type DirPutBuildResponse ¶
type DirPutBuildResponse struct { Value *directory.Build Error *BasicError }
type DirPutDeployResponse ¶
type DirPutDeployResponse struct { Value *directory.Deploy Error *BasicError }
type DirPutDevResponse ¶
type DirPutDevResponse struct { Value *directory.Dev Error *BasicError }
type DirPutInfraResponse ¶
type DirPutInfraResponse struct { Value *directory.Infra Error *BasicError }
type Directory ¶
Directory is an implementatin of directory.Backend that communicates over RPC.
type DirectoryServer ¶
DirectoryServer is a net/rpc compatible structure for serving a directory backend. This should not be used directly.
func (*DirectoryServer) DeleteDev ¶
func (s *DirectoryServer) DeleteDev( args *directory.Dev, reply *ErrorResponse) error
func (*DirectoryServer) GetBlob ¶
func (s *DirectoryServer) GetBlob( args *DirGetBlobArgs, reply *DirGetBlobResponse) error
func (*DirectoryServer) GetBuild ¶
func (s *DirectoryServer) GetBuild( args *directory.Build, reply *DirGetBuildResponse) error
func (*DirectoryServer) GetDeploy ¶
func (s *DirectoryServer) GetDeploy( args *directory.Deploy, reply *DirGetDeployResponse) error
func (*DirectoryServer) GetDev ¶
func (s *DirectoryServer) GetDev( args *directory.Dev, reply *DirGetDevResponse) error
func (*DirectoryServer) GetInfra ¶
func (s *DirectoryServer) GetInfra( args *directory.Infra, reply *DirGetInfraResponse) error
func (*DirectoryServer) PutBlob ¶
func (s *DirectoryServer) PutBlob( args *DirPutBlobArgs, reply *ErrorResponse) error
func (*DirectoryServer) PutBuild ¶
func (s *DirectoryServer) PutBuild( args *directory.Build, reply *DirPutBuildResponse) error
func (*DirectoryServer) PutDeploy ¶
func (s *DirectoryServer) PutDeploy( args *directory.Deploy, reply *DirPutDeployResponse) error
func (*DirectoryServer) PutDev ¶
func (s *DirectoryServer) PutDev( args *directory.Dev, reply *DirPutDevResponse) error
func (*DirectoryServer) PutInfra ¶
func (s *DirectoryServer) PutInfra( args *directory.Infra, reply *DirPutInfraResponse) error
type ErrorResponse ¶
type ErrorResponse struct {
Error *BasicError
}
ErrorResponse is a basic response structure that can be used with the RPC layer to only return an error.
type Server ¶
type Server struct { AppFunc AppFunc // Stdout, Stderr are what this server will use instead of the // normal stdin/out/err. This is because due to the multi-process nature // of our plugin system, we can't use the normal process values so we // make our own custom one we pipe across. Stdout io.Reader Stderr io.Reader }
Server listens for network connections and then dispenses interface implementations over net/rpc.
func (*Server) Accept ¶
Accept accepts connections on a listener and serves requests for each incoming connection. Accept blocks; the caller typically invokes it in a go statement.
func (*Server) ServeConn ¶
func (s *Server) ServeConn(conn io.ReadWriteCloser)
ServeConn runs a single connection.
ServeConn blocks, serving the connection until the client hangs up.
type UiInputResponse ¶
type UiInputResponse struct { Value string Error *BasicError }