git.zd.zone/hrpc/hrpc@v0.0.12/option/certs.go (about)

     1  package option
     2  
     3  type certs struct {
     4  	PubKey []byte
     5  	PriKey []byte
     6  }
     7  
     8  func WithServerCerts(pubkey []byte, prikey []byte) Option {
     9  	return func(o *Options) {
    10  		o.ServerCerts = &certs{
    11  			PubKey: pubkey,
    12  			PriKey: prikey,
    13  		}
    14  	}
    15  }