Documentation ¶
Overview ¶
Package shared contains shared data between the host and plugins.
Index ¶
- Variables
- type GRPCClient
- type GRPCServer
- type RPCClient
- type RPCServer
- type TokenProviderPlugin
- func (*TokenProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
- func (p *TokenProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
- func (p *TokenProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
- func (p *TokenProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Handshake = plugin.HandshakeConfig{
ProtocolVersion: 1,
MagicCookieKey: "GATEWAY_CLIENT_PLUGIN",
MagicCookieValue: "hello",
}
Handshake is a common handshake that is shared by plugin and host.
View Source
var PluginMap = map[string]plugin.Plugin{ "tokenProvider": &TokenProviderPlugin{}, }
Functions ¶
This section is empty.
Types ¶
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of TokenProvider that talks over gRPC.
func (*GRPCClient) GetToken ¶
func (m *GRPCClient) GetToken(ctx context.Context, request apis.TokenRequest) (apis.TokenResponse, error)
type GRPCServer ¶
type GRPCServer struct { Impl apis.TokenProvider // contains filtered or unexported fields }
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) GetToken ¶
func (m *GRPCServer) GetToken( ctx context.Context, req *proto.TokenRequest) (*proto.TokenResponse, error)
type RPCClient ¶
type RPCClient struct {
// contains filtered or unexported fields
}
func (*RPCClient) GetToken ¶
func (m *RPCClient) GetToken(request apis.TokenRequest) (apis.TokenResponse, error)
type RPCServer ¶
type RPCServer struct {
Impl apis.TokenProvider
}
type TokenProviderPlugin ¶
type TokenProviderPlugin struct {
Impl apis.TokenProvider
}
func (*TokenProviderPlugin) Client ¶
func (*TokenProviderPlugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)
func (*TokenProviderPlugin) GRPCClient ¶
func (p *TokenProviderPlugin) GRPCClient(ctx context.Context, broker *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
func (*TokenProviderPlugin) GRPCServer ¶
func (p *TokenProviderPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
func (*TokenProviderPlugin) Server ¶
func (p *TokenProviderPlugin) Server(*plugin.MuxBroker) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.