当前位置: 首页>>代码示例>>Golang>>正文


Golang datastore.Register函数代码示例

本文整理汇总了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{})
}
开发者ID:tartavull,项目名称:dvid,代码行数:7,代码来源:googlevoxels.go

示例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)
}
开发者ID:hanslovsky,项目名称:dvid,代码行数:27,代码来源:rgba8.go

示例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{})
}
开发者ID:hanslovsky,项目名称:dvid,代码行数:13,代码来源:multichan16.go

示例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)
}
开发者ID:janelia-flyem,项目名称:dvid,代码行数:15,代码来源:float32.go

示例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)
}
开发者ID:hanslovsky,项目名称:dvid,代码行数:15,代码来源:uint8.go

示例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{})
}
开发者ID:jwohlwend,项目名称:dvid,代码行数:19,代码来源:labelsurf.go

示例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{})
}
开发者ID:jmptrader,项目名称:dvid,代码行数:21,代码来源:labelblk.go


注:本文中的github.com/janelia-flyem/dvid/datastore.Register函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。