Documentation
¶
Index ¶
- type CachePlugin
- type CacheService
- type DefaultService
- func (s *DefaultService) DeleteCache(r *DeleteCacheRequest) (*DeleteCacheResponse, error)
- func (s *DefaultService) GetCache(r *GetCacheRequest) (*GetCacheResponse, error)
- func (s *DefaultService) SetCache(r *SetCacheRequest) (*SetCacheResponse, error)
- func (s *DefaultService) Setup(setup setup.Setup) error
- type DeleteCacheRequest
- type DeleteCacheResponse
- type GetCacheRequest
- type GetCacheResponse
- type RpcClient
- type RpcServer
- func (s *RpcServer) DeleteCache(req *DeleteCacheRequest, resp *DeleteCacheResponse) error
- func (s *RpcServer) GetCache(req *GetCacheRequest, resp *GetCacheResponse) error
- func (s *RpcServer) SetCache(req *SetCacheRequest, resp *SetCacheResponse) error
- func (s *RpcServer) Setup(req *Setup, resp *error) error
- type SetCacheRequest
- type SetCacheResponse
- type Setup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachePlugin ¶
type CachePlugin struct {
plugin.NetRPCUnsupportedPlugin
Impl CacheService
}
type CacheService ¶
type CacheService interface {
Setup(setup *Setup) error
SetCache(r *SetCacheRequest) (*SetCacheResponse, error)
GetCache(r *GetCacheRequest) (*GetCacheResponse, error)
DeleteCache(r *DeleteCacheRequest) (*DeleteCacheResponse, error)
}
type DefaultService ¶
type DefaultService struct{}
func (*DefaultService) DeleteCache ¶
func (s *DefaultService) DeleteCache(r *DeleteCacheRequest) (*DeleteCacheResponse, error)
func (*DefaultService) GetCache ¶
func (s *DefaultService) GetCache(r *GetCacheRequest) (*GetCacheResponse, error)
func (*DefaultService) SetCache ¶
func (s *DefaultService) SetCache(r *SetCacheRequest) (*SetCacheResponse, error)
type DeleteCacheRequest ¶
type DeleteCacheRequest struct {
Key string `json:"key"`
}
type DeleteCacheResponse ¶
type DeleteCacheResponse struct {
Success bool `json:"success"`
}
type GetCacheRequest ¶
type GetCacheRequest struct {
Key string `json:"key"`
}
type GetCacheResponse ¶
type GetCacheResponse struct {
Value []byte `json:"value"`
}
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func (*RpcClient) DeleteCache ¶
func (c *RpcClient) DeleteCache(req *DeleteCacheRequest) (*DeleteCacheResponse, error)
func (*RpcClient) GetCache ¶
func (c *RpcClient) GetCache(req *GetCacheRequest) (*GetCacheResponse, error)
func (*RpcClient) SetCache ¶
func (c *RpcClient) SetCache(req *SetCacheRequest) (*SetCacheResponse, error)
type RpcServer ¶
type RpcServer struct {
// contains filtered or unexported fields
}
func (*RpcServer) DeleteCache ¶
func (s *RpcServer) DeleteCache(req *DeleteCacheRequest, resp *DeleteCacheResponse) error
func (*RpcServer) GetCache ¶
func (s *RpcServer) GetCache(req *GetCacheRequest, resp *GetCacheResponse) error
func (*RpcServer) SetCache ¶
func (s *RpcServer) SetCache(req *SetCacheRequest, resp *SetCacheResponse) error
type SetCacheRequest ¶
type SetCacheResponse ¶
type SetCacheResponse struct {
Success bool `json:"success"`
}
Click to show internal directories.
Click to hide internal directories.