Esempio n. 1
0
func (handler *KvHandlersImpl) Configure(api *operations.PortLayerAPI, handlerCtx *HandlerContext) {
	api.KvGetValueHandler = kv.GetValueHandlerFunc(handler.GetValueHandler)
	api.KvPutValueHandler = kv.PutValueHandlerFunc(handler.PutValueHandler)
	api.KvDeleteValueHandler = kv.DeleteValueHandlerFunc(handler.DeleteValueHandler)

	// Get the APIKV store -- it should always be present since it's
	// initialized when the portlayer starts
	s, _ := store.Store(store.APIKV)
	handler.defaultStore = s
}