Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomCostPlugin ¶
type CustomCostPlugin struct { plugin.Plugin // Impl Injection Impl CustomCostSource }
func (CustomCostPlugin) GRPCClient ¶
func (CustomCostPlugin) GRPCClient(context context.Context, b *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)
this method is called for as part of the reference plugin implementation see https://github.com/hashicorp/go-plugin/blob/main/examples/basic/shared/greeter_interface.go#L63 for context and details
func (*CustomCostPlugin) GRPCServer ¶
func (p *CustomCostPlugin) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error
this method is called for as part of the reference plugin implementation see https://github.com/hashicorp/go-plugin/blob/main/examples/basic/shared/greeter_interface.go#L59 for context and details
type CustomCostSource ¶
type CustomCostSource interface {
GetCustomCosts(req *pb.CustomCostRequest) []*pb.CustomCostResponse
}
plugin interface
type GRPCClient ¶
type GRPCClient struct {
// contains filtered or unexported fields
}
GRPCClient is an implementation of CustomCostsSource that talks over RPC.
func (*GRPCClient) GetCustomCosts ¶
func (m *GRPCClient) GetCustomCosts(req *pb.CustomCostRequest) []*pb.CustomCostResponse
type GRPCServer ¶
type GRPCServer struct { pb.UnimplementedCustomCostsSourceServer // This is the real implementation Impl CustomCostSource }
Here is the gRPC server that GRPCClient talks to.
func (*GRPCServer) GetCustomCosts ¶
func (m *GRPCServer) GetCustomCosts( ctx context.Context, req *pb.CustomCostRequest) (*pb.CustomCostResponseSet, error)
Click to show internal directories.
Click to hide internal directories.