Documentation ¶
Index ¶
- Constants
- type Deployer
- func (d *Deployer) AddHSTSHeaderMiddleware(next http.Handler) http.Handler
- func (d *Deployer) BasicAuth(r *http.Request) (string, error)
- func (d *Deployer) BasicAuthMiddleware(next http.Handler) http.Handler
- func (d *Deployer) ClusterVersionHandler(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) Create(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) CreateEndpoint() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) CreateListener(address string, tlsConfig *tls.Config) error
- func (d *Deployer) Delete(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) DeleteEndpoint() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) GetAll(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) GetAllEndpoint() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) GetEndpointSection() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) GetSection(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) Init() error
- func (d *Deployer) K8sVersionEndpoint() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) PatchEndpointSection() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) PatchSection(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) PrecreateOrderer(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) PrecreatedOrdererEndpoint() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) Serve()
- func (d *Deployer) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (d *Deployer) Stop() error
- func (d *Deployer) UpdateEndpointSection() func(http.ResponseWriter, *http.Request)
- func (d *Deployer) UpdateSection(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) Version(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
- func (d *Deployer) VersionEndpoint() func(http.ResponseWriter, *http.Request)
- type Endpoint
- type Errors
- type HTTPResponseWriter
Constants ¶
View Source
const ( GET = "get" POST = "post" PATCH = "patch" DELETE = "delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployer ¶
type Deployer struct { Config *config.DeployerSettingsConfig LocalConfig *config.LocalConfig BlockingStart bool Logger *zap.SugaredLogger Router *chi.Mux Listener net.Listener IBPOperatorClient *ibpoperator.Client K8SClient *kube.Kube CA *ca.CA Peer *peer.Peer Orderer *orderer.Orderer Operator *operator.Operator // contains filtered or unexported fields }
func New ¶
func New(config *config.DeployerSettingsConfig, localConfig *config.LocalConfig, blockingStart bool) *Deployer
New is a hook that is called with the Options the program is run with. Deployer is the place where you will initialize your Deployer with the parameters passed in.
func (*Deployer) AddHSTSHeaderMiddleware ¶
func (*Deployer) BasicAuthMiddleware ¶
func (*Deployer) ClusterVersionHandler ¶
func (d *Deployer) ClusterVersionHandler(w http.ResponseWriter, r *http.Request) (interface{}, int, error)
ClusterVersionHandler will handle getting kubernetes cluster version
func (*Deployer) CreateEndpoint ¶
func (d *Deployer) CreateEndpoint() func(http.ResponseWriter, *http.Request)
func (*Deployer) CreateListener ¶
func (*Deployer) DeleteEndpoint ¶
func (d *Deployer) DeleteEndpoint() func(http.ResponseWriter, *http.Request)
func (*Deployer) GetAllEndpoint ¶
func (d *Deployer) GetAllEndpoint() func(http.ResponseWriter, *http.Request)
func (*Deployer) GetEndpointSection ¶
func (d *Deployer) GetEndpointSection() func(http.ResponseWriter, *http.Request)
func (*Deployer) GetSection ¶
func (*Deployer) K8sVersionEndpoint ¶
func (d *Deployer) K8sVersionEndpoint() func(http.ResponseWriter, *http.Request)
K8sVersionEndpoint returns an endpoint type that is responsible for handling getting kuberenetes cluster version
func (*Deployer) PatchEndpointSection ¶
func (d *Deployer) PatchEndpointSection() func(http.ResponseWriter, *http.Request)
func (*Deployer) PatchSection ¶
func (*Deployer) PrecreateOrderer ¶
func (*Deployer) PrecreatedOrdererEndpoint ¶
func (d *Deployer) PrecreatedOrdererEndpoint() func(http.ResponseWriter, *http.Request)
func (*Deployer) UpdateEndpointSection ¶
func (d *Deployer) UpdateEndpointSection() func(http.ResponseWriter, *http.Request)
func (*Deployer) UpdateSection ¶
func (*Deployer) VersionEndpoint ¶
func (d *Deployer) VersionEndpoint() func(http.ResponseWriter, *http.Request)
type Endpoint ¶
type Endpoint struct { // Handler is the handler function for this endpoint Handler func(w http.ResponseWriter, r *http.Request) (interface{}, int, error) Logger *zap.SugaredLogger }
Endpoint represents a particular endpoint
func NewEndpoint ¶
type HTTPResponseWriter ¶
type HTTPResponseWriter struct {
// contains filtered or unexported fields
}
func NewHTTPResponseWriter ¶
func NewHTTPResponseWriter(r *http.Request, w http.ResponseWriter, se *Endpoint) *HTTPResponseWriter
func (*HTTPResponseWriter) Header ¶
func (hrw *HTTPResponseWriter) Header() http.Header
Header returns the header map that will be sent by WriteHeader.
func (*HTTPResponseWriter) Write ¶
func (hrw *HTTPResponseWriter) Write(buf []byte) (int, error)
Write writes the data to the connection as part of an HTTP reply.
func (*HTTPResponseWriter) WriteHeader ¶
func (hrw *HTTPResponseWriter) WriteHeader(scode int)
WriteHeader sends an HTTP response header with status code.
Directories ¶
Path | Synopsis |
---|---|
components
|
|
ca/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
operator/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
orderer/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
peer/mocks
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.