Documentation ¶
Overview ¶
This file contains the REST component that uses grpc-gateway to provide a REST gateway the the ldlm gRPC server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRestServer ¶
func NewRestServer(server grpcLockServer, conf *RestConfig, sConf *sec.SecurityConfig) (*http.Server, func(), error)
NewRestServer creates a new REST server that handles LDLM gRPC requests.
Parameters: - server: The gRPC server that handles LDLM requests. - conf: The configuration for the REST server. - sConf: The security configuration for the REST server.
Returns: - *http.Server: The newly created REST server. - func(): A function to close the server. - error: An error if there was a problem creating the server.
func Run ¶
func Run(server grpcLockServer, conf *RestConfig, sConf *sec.SecurityConfig) (func(), error)
Run starts a REST server that handles LDLM gRPC requests.
Parameters: - server: The gRPC server that handles LDLM requests. - conf: The configuration for the REST server. - sConf: The security configuration for the REST server.
Returns: - A function that can be used to stop the server. - An error if there was a problem starting the server.