github.com/ergo-services/ergo@v1.999.224/apps/system/types.go (about)

     1  package system
     2  
     3  import (
     4  	"github.com/ergo-services/ergo/etf"
     5  	"github.com/ergo-services/ergo/lib"
     6  )
     7  
     8  type MessageSystemAnonMetrics struct {
     9  	Name        string
    10  	Arch        string
    11  	OS          string
    12  	NumCPU      int
    13  	GoVersion   string
    14  	ErgoVersion string
    15  }
    16  
    17  func RegisterTypes() error {
    18  	types := []interface{}{
    19  		MessageSystemAnonMetrics{},
    20  	}
    21  	rtOpts := etf.RegisterTypeOptions{Strict: true}
    22  
    23  	for _, t := range types {
    24  		if _, err := etf.RegisterType(t, rtOpts); err != nil && err != lib.ErrTaken {
    25  			return err
    26  		}
    27  	}
    28  	return nil
    29  }