Documentation
¶
Index ¶
- Variables
- func NewEsimFactory(logger logger.Logger) *esimFactory
- func NewRpcPluginStructField(writer file_dir.IfaceWriter, logger log2.Logger) *rpcPluginStructField
- type InitFieldsReturn
- type Model
- type ModelPlugin
- type ModelRPC
- type ModelRPCServer
- type Plural
- type PoolTpl
- type SortReturn
- type StructFieldIface
- type Var
Constants ¶
This section is empty.
Variables ¶
View Source
var HandshakeConfig = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "BASIC_PLUGIN",
MagicCookieValue: "hello",
}
Functions ¶
func NewEsimFactory ¶ added in v0.0.5
func NewRpcPluginStructField ¶ added in v0.0.5
Types ¶
type InitFieldsReturn ¶
type ModelPlugin ¶
type ModelPlugin struct {
// Impl Injection
Impl Model
}
This is the implementation of plugin.Plugin so we can serve/consume this
This has two methods: Server must return an RPC server for this plugin type. We construct a ModelRPCServer for this.
Client must return an implementation of our interface that communicates over an RPC client. We return ModelRPC for this.
Ignore MuxBroker. That is used to create more multiplexed streams on our plugin connection and is a more advanced use case.
type ModelRPC ¶
type ModelRPC struct {
// contains filtered or unexported fields
}
Here is an implementation that talks over RPC
type ModelRPCServer ¶
type ModelRPCServer struct {
// This is the real implementation
Impl Model
}
Here is the RPC server that ModelRPC talks to, conforming to the requirements of net/rpc
func (*ModelRPCServer) InitField ¶
func (s *ModelRPCServer) InitField(args interface{}, resp *string) error
func (*ModelRPCServer) Sort ¶
func (s *ModelRPCServer) Sort(args interface{}, resp *string) error
type Plural ¶ added in v0.0.5
func (Plural) ReleaseString ¶ added in v0.0.5
func (Plural) TypeString ¶ added in v0.0.5
type PoolTpl ¶ added in v0.0.5
func NewPoolTpl ¶ added in v0.0.5
func NewPoolTpl() PoolTpl
type SortReturn ¶
type StructFieldIface ¶ added in v0.0.5
Source Files
¶
Click to show internal directories.
Click to hide internal directories.