Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

REST Layer ElasticSearch resource storage handler

NotificationsYou must be signed in to change notification settings

rs/rest-layer-es

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godoclicensebuild

ThisREST Layer resource storage backend stores data in an ElasticSearch cluster usingolivere/elastic.

ElasticSearch v5+ is required.

Usage

import"github.com/rs/rest-layer-es"

Create an elastic client:

client,err:=elastic.NewClient()

Create a resource storage handler with a given DB/collection:

s:=es.NewHandler(client,"index","type")

Use this handler with a resource:

index.Bind("foo",foo,s,resource.DefaultConf)

You may want to create as many ElasticSearch handlers with different index and/or type. You can share the sameelastic client across all you handlers.

About

REST Layer ElasticSearch resource storage handler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp