Documentation ¶
Index ¶
Constants ¶
const ( // ErrInvalidPath is used if the HTTP path is not supported ErrInvalidPath = "Invalid path" // ErrInvalidMethod is used if the HTTP method is not supported ErrInvalidMethod = "Invalid http method" // ErrGetMethodRequired is used if the HTTP GET method is required" ErrGetMethodRequired = "GET method required" // ErrPutMethodRequired is used if the HTTP PUT/POST method is required" ErrPutMethodRequired = "PUT/POST method required" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVCServer ¶
type CVCServer struct {
// contains filtered or unexported fields
}
CVCServer contains the information to start the CVCServer which is helpful to serve the request
func NewCVCServer ¶
NewCVCServer is used to create a new CVC server with the given configuration
func (*CVCServer) Shutdown ¶
func (cs *CVCServer) Shutdown()
Shutdown is used to terminate CVCServer
func (*CVCServer) WithKubernetesClientSet ¶
func (cs *CVCServer) WithKubernetesClientSet(kubeclientset kubernetes.Interface) *CVCServer
WithKubernetesClientSet sets the kubeclientset whith provided argument
func (*CVCServer) WithOpenebsClientSet ¶
WithOpenebsClientSet sets the kubeclientset whith provided argument
func (*CVCServer) WithSnapshotter ¶
func (cs *CVCServer) WithSnapshotter(snapshotter snapshot.Snapshotter) *CVCServer
WithSnapshotter sets the snapshotter with provided argument
type HTTPCodedError ¶
HTTPCodedError is used to provide the HTTP error code
func CodedError ¶
func CodedError(c int, msg string) HTTPCodedError
CodedError is used to provide HTTP error Code and corresponding error msg
func CodedErrorWrap ¶
func CodedErrorWrap(code int, err error) HTTPCodedError
CodedErrorWrap is used to provide HTTP error Code and corresponding error
func CodedErrorWrapf ¶
func CodedErrorWrapf(code int, err error, msg string, args ...interface{}) HTTPCodedError
CodedErrorWrapf is used to provide HTTP error Code and corresponding error as well additional details in a format decided by the caller
func CodedErrorf ¶
func CodedErrorf(code int, msg string, args ...interface{}) HTTPCodedError
CodedErrorf is used to provide HTTP error Code and corresponding error details in a format decided by the caller
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer is used to wrap cvc server and expose it over an HTTP interface
func NewHTTPServer ¶
func NewHTTPServer(cvcServer *CVCServer) (*HTTPServer, error)
NewHTTPServer starts new HTTP server over CVC Server
func (*HTTPServer) Shutdown ¶
func (s *HTTPServer) Shutdown()
Shutdown is used to shutdown the HTTP server