本文整理汇总了Golang中github.com/janelia-flyem/dvid/datastore.Register函数的典型用法代码示例。如果您正苦于以下问题:Golang Register函数的具体用法?Golang Register怎么用?Golang Register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Register函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
datastore.Register(NewType())
// Need to register types that will be used to fulfill interfaces.
gob.Register(&Type{})
gob.Register(&Data{})
}
示例2: init
func init() {
rgba8EncodeFormat = dvid.DataValues{
{
T: dvid.T_uint8,
Label: "red",
},
{
T: dvid.T_uint8,
Label: "green",
},
{
T: dvid.T_uint8,
Label: "blue",
},
{
T: dvid.T_uint8,
Label: "alpha",
},
}
interpolable := true
rgba := NewType(rgba8EncodeFormat, interpolable)
rgba.Type.Name = "rgba8blk"
rgba.Type.URL = "github.com/janelia-flyem/dvid/datatype/imageblk/rgba8.go"
rgba.Type.Version = "0.2"
datastore.Register(&rgba)
}
示例3: init
func init() {
interpolable := true
dtype := NewType(compositeValues, interpolable)
// See doc for package on why channels are segregated instead of interleaved.
// Data types must be registered with the datastore to be used.
typeService = &dtype
datastore.Register(&dtype)
// Need to register types that will be used to fulfill interfaces.
gob.Register(&Type{})
gob.Register(&Data{})
}
示例4: init
func init() {
float32EncodeFormat = dvid.DataValues{
{
T: dvid.T_float32,
Label: "float32",
},
}
interpolable := true
floatimg := NewType(float32EncodeFormat, interpolable)
floatimg.Type.Name = "float32blk"
floatimg.Type.URL = "github.com/janelia-flyem/dvid/datatype/imageblk/float32.go"
floatimg.Type.Version = "0.1"
datastore.Register(&floatimg)
}
示例5: init
func init() {
uint8EncodeFormat = dvid.DataValues{
{
T: dvid.T_uint8,
Label: "uint8",
},
}
interpolable := true
grayscale := NewType(uint8EncodeFormat, interpolable)
grayscale.Type.Name = "uint8blk"
grayscale.Type.URL = "github.com/janelia-flyem/dvid/datatype/imageblk/uint8.go"
grayscale.Type.Version = "0.2"
datastore.Register(&grayscale)
}
示例6: init
func init() {
dtype = new(Type)
dtype.Type = datastore.Type{
Name: TypeName,
URL: RepoURL,
Version: Version,
Requirements: &storage.Requirements{
Batcher: true,
},
}
// See doc for package on why channels are segregated instead of interleaved.
// Data types must be registered with the datastore to be used.
datastore.Register(dtype)
// Need to register types that will be used to fulfill interfaces.
gob.Register(&Type{})
gob.Register(&Data{})
}
示例7: init
func init() {
encodeFormat = dvid.DataValues{
{
T: dvid.T_uint64,
Label: TypeName,
},
}
interpolable := false
dtype = Type{imageblk.NewType(encodeFormat, interpolable)}
dtype.Type.Name = TypeName
dtype.Type.URL = RepoURL
dtype.Type.Version = Version
// See doc for package on why channels are segregated instead of interleaved.
// Data types must be registered with the datastore to be used.
datastore.Register(&dtype)
// Need to register types that will be used to fulfill interfaces.
gob.Register(&Type{})
gob.Register(&Data{})
}